summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bitmap/bitscale.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c
index c9af4c0..13ed924 100644
--- a/src/bitmap/bitscale.c
+++ b/src/bitmap/bitscale.c
@@ -1479,6 +1479,10 @@ BitmapScaleBitmaps(FontPtr pf, /* scaled font */
lastRow = pfi->lastRow;
nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1);
+ if (nchars <= 0) {
+ goto bail;
+ }
+
glyph = pf->glyph;
for (i = 0; i < nchars; i++)
{