From: Pranav Batra Date: Tue, 29 Sep 2020 21:50:00 +0000 (+0000) Subject: undefined behavior: signed integer overflow X-Git-Tag: v2.3.3op1~67^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13%2Fhead;p=thirdparty%2Fcups.git undefined behavior: signed integer overflow --- diff --git a/cups/ppd.c b/cups/ppd.c index 199cf03484..fd74a9cd67 100644 --- a/cups/ppd.c +++ b/cups/ppd.c @@ -2839,7 +2839,7 @@ ppd_hash_option(ppd_option_t *option) /* I - Option */ for (hash = option->keyword[0], k = option->keyword + 1; *k;) - hash = 33 * hash + *k++; + hash = (int)(33U * (unsigned)hash) + *k++; return (hash & 511); }