about summary refs log tree commit diff
path: root/converter/pbm/pbmtogo.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/pbm/pbmtogo.c')
-rw-r--r--converter/pbm/pbmtogo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/converter/pbm/pbmtogo.c b/converter/pbm/pbmtogo.c
index 67fe5821..e10fb2ff 100644
--- a/converter/pbm/pbmtogo.c
+++ b/converter/pbm/pbmtogo.c
@@ -88,6 +88,11 @@ main( argc, argv )
       ifp = stdin;
 
     pbm_readpbminit(ifp, &cols, &rows, &format);
+
+    if (cols > 1056)
+        pm_error("Image is wider (%u pixels) than a Graphon terminal "
+                 "(%u pixels)", cols, 1056);
+
     bitrow = pbm_allocrow(cols);
 
     /* Round cols up to the nearest multiple of 8. */