openbsd-ports/x11/openmotif/patches/patch-lib_Xm_XpmCrDatFrI_c
2004-09-01 22:57:36 +00:00

13 lines
526 B
Plaintext

$OpenBSD: patch-lib_Xm_XpmCrDatFrI_c,v 1.1 2004/09/01 22:57:36 pvalchev Exp $
--- lib/Xm/XpmCrDatFrI.c.orig Fri Apr 28 09:05:22 2000
+++ lib/Xm/XpmCrDatFrI.c Wed Sep 1 01:31:33 2004
@@ -129,6 +129,8 @@ XpmCreateDataFromXpmImage(data_return, i
*/
header_nlines = 1 + image->ncolors;
header_size = sizeof(char *) * header_nlines;
+ if (header_size >= SIZE_MAX / sizeof(char *))
+ return (XpmNoMemory);
header = (char **) XpmCalloc(header_size, sizeof(char *));
if (!header)
return (XpmNoMemory);