]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
cupstestppd.c: limit PSVersion sscanf size and stop at a newline 4996/head
authorRory McNamara <git@rorym.cnamara.com>
Wed, 10 May 2017 12:31:00 +0000 (13:31 +0100)
committerRory McNamara <git@rorym.cnamara.com>
Wed, 10 May 2017 12:31:00 +0000 (13:31 +0100)
systemv/cupstestppd.c

index dbce718658be6094d252f76e18e894500dc50f14..9344c51eedc6d10c4fc2a3fa10c81986fcdb571c 100644 (file)
@@ -923,7 +923,7 @@ main(int  argc,                             /* I - Number of command-line args */
        int     junkint;                        /* Temp integer */
 
 
-        if (sscanf(attr->value, "(%[^)])%d", junkstr, &junkint) != 2)
+        if (sscanf(attr->value, "(%254[^)\n])%d", junkstr, &junkint) != 2)
        {
          if (verbose >= 0)
          {