summaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorjmz <jmz@FreeBSD.org>2000-08-25 21:07:42 +0000
committerjmz <jmz@FreeBSD.org>2000-08-25 21:07:42 +0000
commit4a554d39d603a45585f6cba853b4cdf54b20e9b1 (patch)
tree4d7d189ba2bb95af9dfbec664ca95edf23f09df6 /comms
parentb85c387e1ba3f6d4f56d3163883ce2e80155ddc9 (diff)
downloadFreeBSD-ports-4a554d39d603a45585f6cba853b4cdf54b20e9b1.zip
FreeBSD-ports-4a554d39d603a45585f6cba853b4cdf54b20e9b1.tar.gz
Fix a buffer overrun for some incorrect input files.
Submitted by: Paul Eggert <eggert@twinsun.com>
Diffstat (limited to 'comms')
-rw-r--r--comms/viewfax/files/patch-aa12
1 files changed, 12 insertions, 0 deletions
diff --git a/comms/viewfax/files/patch-aa b/comms/viewfax/files/patch-aa
new file mode 100644
index 0000000..844595f
--- /dev/null
+++ b/comms/viewfax/files/patch-aa
@@ -0,0 +1,12 @@
+--- viewfax.c 1996/11/13 21:46:44 2.4
++++ viewfax.c 2000/08/25 19:51:10 2.4.0.1
+@@ -294,6 +294,9 @@ drawline(pixnum *run, int LineNum, struc
+ while (tot < pn->width) {
+ n = *r++;
+ tot += n;
++ /* Watch out for buffer overruns, e.g. when n == 65535. */
++ if (tot > pn->width)
++ break;
+ if (pix)
+ acc |= (~(t32bits)0 >> nacc);
+ else if (nacc)
OpenPOWER on IntegriCloud