diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpbmfont.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpbmfont.c b/lib/libpbmfont.c index 708205a2..902eaf0d 100644 --- a/lib/libpbmfont.c +++ b/lib/libpbmfont.c @@ -1187,7 +1187,7 @@ createBmap(unsigned int const glyphWidth, unsigned char * bmap; int rc; - if (UINT_MAX / glyphWidth < glyphHeight) + if (glyphWidth > 0 && UINT_MAX / glyphWidth < glyphHeight) pm_error("Ridiculously large glyph"); MALLOCARRAY(bmap, glyphWidth * glyphHeight); |