From: Rory McNamara Date: Wed, 10 May 2017 12:31:00 +0000 (+0100) Subject: cupstestppd.c: limit PSVersion sscanf size and stop at a newline X-Git-Tag: v2.2.4~18^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95633d62829e1babc3ef7b8ac710994aa69901b1;p=thirdparty%2Fcups.git cupstestppd.c: limit PSVersion sscanf size and stop at a newline --- diff --git a/systemv/cupstestppd.c b/systemv/cupstestppd.c index dbce718658..9344c51eed 100644 --- a/systemv/cupstestppd.c +++ b/systemv/cupstestppd.c @@ -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) {