]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Change strncmp parameter 566/head
authorRose <83477269+AtariDreams@users.noreply.github.com>
Thu, 1 Dec 2022 16:57:08 +0000 (11:57 -0500)
committerRose <83477269+AtariDreams@users.noreply.github.com>
Thu, 1 Dec 2022 17:30:57 +0000 (12:30 -0500)
Either the parameter being passed should be 6, not 7, because of the null terminator in the string literal, or strcmp should be used instead.

cups/ppd-cache.c

index 594290a85269c5412f0f9d5fc24c618ea5abe403..3da921d0a38b75b5495d350281edbb29f8eec954 100644 (file)
@@ -4160,7 +4160,7 @@ _ppdCreateFromIPP2(
 
        PRINTF_COLOROPTION("Gray16", _("Deep Gray"), CUPS_CSPACE_SW, 16)
       }
-      else if (!strcasecmp(keyword, "srgb_8") || !strncmp(keyword, "SRGB24", 7) || !strcmp(keyword, "color"))
+      else if (!strcasecmp(keyword, "srgb_8") || !strncmp(keyword, "SRGB24", 6) || !strcmp(keyword, "color"))
       {
        PRINTF_COLORMODEL