Commit 166bef28b for imagemagick.org

commit 166bef28bca67b7a96dd42f753f3c0aafe72900b
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Sun Feb 22 21:17:01 2026 -0500

    cosmetic

diff --git a/MagickCore/blob.c b/MagickCore/blob.c
index 60a2382ff..00d5b554b 100644
--- a/MagickCore/blob.c
+++ b/MagickCore/blob.c
@@ -3352,45 +3352,58 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info,
     {
       flags=O_RDONLY;
       type="r";
+      status=IsRightsAuthorized(SystemPolicyDomain,ReadPolicyRights,"follow");
       break;
     }
     case ReadBinaryBlobMode:
     {
       flags=O_RDONLY | O_BINARY;
       type="rb";
+      status=IsRightsAuthorized(SystemPolicyDomain,ReadPolicyRights,"follow");
       break;
     }
     case WriteBlobMode:
     {
       flags=O_WRONLY | O_CREAT | O_TRUNC;
       type="w";
+      status=IsRightsAuthorized(SystemPolicyDomain,WritePolicyRights,"follow");
       break;
     }
     case WriteBinaryBlobMode:
     {
       flags=O_RDWR | O_CREAT | O_TRUNC | O_BINARY;
       type="w+b";
+      status=IsRightsAuthorized(SystemPolicyDomain,ReadPolicyRights |
+        WritePolicyRights,"follow");
       break;
     }
     case AppendBlobMode:
     {
       flags=O_WRONLY | O_CREAT | O_APPEND;
       type="a";
+      status=IsRightsAuthorized(SystemPolicyDomain,WritePolicyRights,"follow");
       break;
     }
     case AppendBinaryBlobMode:
     {
       flags=O_RDWR | O_CREAT | O_APPEND | O_BINARY;
       type="a+b";
+      status=IsRightsAuthorized(SystemPolicyDomain,ReadPolicyRights |
+        WritePolicyRights,"follow");
       break;
     }
     default:
     {
       flags=O_RDONLY;
       type="r";
+      status=IsRightsAuthorized(SystemPolicyDomain,ReadPolicyRights,"follow");
       break;
     }
   }
+#if defined(O_NOFOLLOW)
+  if (status == MagickFalse)
+    flags|=O_NOFOLLOW;
+#endif
   if (*type != 'r')
     blob_info->synchronize=image_info->synchronize;
   if (image_info->stream != (StreamHandler) NULL)
@@ -3538,11 +3551,6 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info,
           file;

         blob_info->file_info.file=(FILE *) NULL;
-#if defined(O_NOFOLLOW)
-        status=IsRightsAuthorized(SystemPolicyDomain,ReadPolicyRights,"follow");
-        if (status == MagickFalse)
-          flags|=O_NOFOLLOW;
-#endif
         file=open_utf8(filename,flags,0);
         if (file >= 0)
           blob_info->file_info.file=fdopen(file,type);
@@ -3669,12 +3677,6 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info,
               file;

             blob_info->file_info.file=(FILE *) NULL;
-#if defined(O_NOFOLLOW)
-            status=IsRightsAuthorized(SystemPolicyDomain,WritePolicyRights,
-              "follow");
-            if (status == MagickFalse)
-              flags|=O_NOFOLLOW;
-#endif
             file=open_utf8(filename,flags,0666);
             if (file >= 0)
               blob_info->file_info.file=fdopen(file,type);