diff options
Diffstat (limited to 'converter/pbm')
-rw-r--r-- | converter/pbm/pbmtoxbm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/converter/pbm/pbmtoxbm.c b/converter/pbm/pbmtoxbm.c index ecb72b30..1a003189 100644 --- a/converter/pbm/pbmtoxbm.c +++ b/converter/pbm/pbmtoxbm.c @@ -353,6 +353,10 @@ convertRaster(FILE * const ifP, unsigned char * bitrow; unsigned int row; + if (cols > UINT_MAX - bitsPerUnit) + pm_error("Image is too wide (%u columns) for computations", + cols); + putinit(xbmVersion); bitrow = pbm_allocrow_packed(cols + padright); |