1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

A better fix for the buffer overflow problem.

Submitted by:	guy@device.dyndns.org
This commit is contained in:
Jean-Marc Zucconi 2004-01-20 00:36:37 +00:00
parent 5d60900891
commit e35846b662
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=98622
2 changed files with 2 additions and 2 deletions

View File

@ -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/

View File

@ -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);