From 201b449cbdfb876fbe5dc2ccb552a4d0b253bfad Mon Sep 17 00:00:00 2001 From: jmz Date: Tue, 20 Jan 2004 00:36:37 +0000 Subject: A better fix for the buffer overflow problem. Submitted by: guy@device.dyndns.org --- comms/viewfax/Makefile | 2 +- comms/viewfax/files/patch-aa | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'comms/viewfax') 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); -- cgit