$NetBSD: patch-bb,v 1.1 2004/12/18 00:39:31 tron Exp $ --- lib/Xm/XpmCrDatFrI.c.orig 2000-04-28 16:05:22.000000000 +0100 +++ lib/Xm/XpmCrDatFrI.c 2004-12-17 23:20:38.000000000 +0000 @@ -129,6 +129,8 @@ */ 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);