diff options
Diffstat (limited to 'src/CrDatFrI.c')
-rw-r--r-- | src/CrDatFrI.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/CrDatFrI.c b/src/CrDatFrI.c index 55f8b06..8bec109 100644 --- a/src/CrDatFrI.c +++ b/src/CrDatFrI.c @@ -124,6 +124,8 @@ XpmCreateDataFromXpmImage(data_return, image, info) */ 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); |