]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
undefined behavior: signed integer overflow 13/head
authorPranav Batra <batrapranav@chromium.org>
Tue, 29 Sep 2020 21:50:00 +0000 (21:50 +0000)
committerPranav Batra <batrapranav@chromium.org>
Tue, 6 Oct 2020 02:19:36 +0000 (02:19 +0000)
cups/ppd.c

index 199cf0348413cb6e8f30e564c091d6640ca6253f..fd74a9cd67601b9d096e03cb23b71e21fe9678b9 100644 (file)
@@ -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);
 }