aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/src/RdBitF.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/src/RdBitF.c')
-rw-r--r--nx-X11/lib/src/RdBitF.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nx-X11/lib/src/RdBitF.c b/nx-X11/lib/src/RdBitF.c
index 319a0ee0b..d34aafb24 100644
--- a/nx-X11/lib/src/RdBitF.c
+++ b/nx-X11/lib/src/RdBitF.c
@@ -49,7 +49,7 @@ from The Open Group.
#include "Xutil.h"
#include <stdio.h>
#include <ctype.h>
-
+#include "reallocarray.h"
#define MAX_SIZE 255
@@ -187,10 +187,10 @@ XReadBitmapFileData (
bytes_per_line = (ww+7)/8 + padding;
- size = bytes_per_line * hh;
- bits = Xmalloc (size);
+ bits = Xmallocarray (hh, bytes_per_line);
if (!bits)
RETURN (BitmapNoMemory);
+ size = bytes_per_line * hh;
if (version10p) {
unsigned char *ptr;