Commit f83765c6e for imagemagick.org

commit f83765c6e4f1ebfb38fa3b4c4c062a166f270cbc
Author: Dirk Lemstra <dirk@lemstra.org>
Date:   Tue Dec 2 21:51:27 2025 +0100

    Added extra check to make sure don't read after an empty string.

diff --git a/coders/png.c b/coders/png.c
index 81c45c257..42a854a53 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -7692,7 +7692,7 @@ Magick_png_write_raw_profile(const ImageInfo *image_info,png_struct *ping,
        { '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' },
      *sp;

-   if (length > 10)
+   if ((length > 10) && (*profile_type != '\0'))
      {
        if (LocaleNCompare((char *) profile_type+1, "ng-chunk-",9) == 0)
           return;