aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorjmz <jmz@FreeBSD.org>2004-01-20 08:36:37 +0800
committerjmz <jmz@FreeBSD.org>2004-01-20 08:36:37 +0800
commit201b449cbdfb876fbe5dc2ccb552a4d0b253bfad (patch)
tree6819dea9606399702c188ed6ac9b807d9ebfd2cc /comms
parent13a320f516761946a8355464bea5e3a7c6d05bee (diff)
downloadfreebsd-ports-gnome-201b449cbdfb876fbe5dc2ccb552a4d0b253bfad.tar.gz
freebsd-ports-gnome-201b449cbdfb876fbe5dc2ccb552a4d0b253bfad.tar.zst
freebsd-ports-gnome-201b449cbdfb876fbe5dc2ccb552a4d0b253bfad.zip
A better fix for the buffer overflow problem.
Submitted by: guy@device.dyndns.org
Diffstat (limited to 'comms')
-rw-r--r--comms/viewfax/Makefile2
-rw-r--r--comms/viewfax/files/patch-aa2
2 files changed, 2 insertions, 2 deletions
diff --git a/comms/viewfax/Makefile b/comms/viewfax/Makefile
index 016158a112a4..473247dcbd80 100644
--- a/comms/viewfax/Makefile
+++ b/comms/viewfax/Makefile
@@ -7,7 +7,7 @@
PORTNAME= viewfax
PORTVERSION= 2.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= comms
MASTER_SITES= ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/
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);