about summary refs log tree commit diff
path: root/generator
diff options
context:
space:
mode:
Diffstat (limited to 'generator')
-rw-r--r--generator/pbmtext.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generator/pbmtext.c b/generator/pbmtext.c
index 7ea64857..a4566d12 100644
--- a/generator/pbmtext.c
+++ b/generator/pbmtext.c
@@ -1282,6 +1282,8 @@ computeImageWidth(struct Text          const formattedText,
                   unsigned int *       const colsP,
                   unsigned int *       const maxleftbP) {
 
+    assert (pbm_maxfontwidth() < (INT_MAX - 10) / LINEBUFSIZE);
+
     if (intercharacterSpace < 0 && fontP->maxwidth < -intercharacterSpace)
         pm_error("negative -space value %.2f exceeds font width",
                  intercharacterSpace);