diff options
Diffstat (limited to 'comms/viewfax/files/patch-aa')
-rw-r--r-- | comms/viewfax/files/patch-aa | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/comms/viewfax/files/patch-aa b/comms/viewfax/files/patch-aa index b8782ecf2042..3030676024f0 100644 --- a/comms/viewfax/files/patch-aa +++ b/comms/viewfax/files/patch-aa @@ -5,7 +5,7 @@ n = *r++; tot += n; + /* Watch out for buffer overruns, e.g. when n == 65535. */ -+ if (tot >= pn->width) ++ if ( tot > pn->width || LineNum >= pn->height && tot >= pn->width ) + break; if (pix) acc |= (~(t32bits)0 >> nacc); |