about summary refs log tree commit diff
path: root/lib/libpbmfont.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpbmfont.c')
-rw-r--r--lib/libpbmfont.c2
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);