pkgsrc/x11/openmotif/patches/patch-bd
tron fd63287501 Fix vulnerabilities reported in CAN-2004-0687 and CAN-2004-0688 by
applying a patch based on ICS's patch for OpenMotif 2.2.3.
2004-12-18 00:39:31 +00:00

13 lines
417 B
Text

$NetBSD: patch-bd,v 1.1 2004/12/18 00:39:31 tron Exp $
--- lib/Xm/XpmWrFFrI.c.orig 2000-04-28 16:05:22.000000000 +0100
+++ lib/Xm/XpmWrFFrI.c 2004-12-17 23:20:38.000000000 +0000
@@ -239,6 +239,8 @@
unsigned int x, y, h;
h = height - 1;
+ if (cpp != 0 && width >= (SIZE_MAX - 3)/cpp)
+ return XpmNoMemory;
p = buf = (char *) XpmMalloc(width * cpp + 3);
if (!buf)
return (XpmNoMemory);