summaryrefslogtreecommitdiff
path: root/graphics/xpm/patches/patch-af
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/xpm/patches/patch-af')
-rw-r--r--graphics/xpm/patches/patch-af13
1 files changed, 13 insertions, 0 deletions
diff --git a/graphics/xpm/patches/patch-af b/graphics/xpm/patches/patch-af
new file mode 100644
index 00000000000..5a511d00424
--- /dev/null
+++ b/graphics/xpm/patches/patch-af
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1 2004/09/16 15:09:01 minskim Exp $
+
+--- lib/CrDatFrI.c.orig Thu Mar 19 13:50:59 1998
++++ lib/CrDatFrI.c
+@@ -123,6 +123,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);