pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/nbsed/files sync with src:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/14859658f86c
branches:  trunk
changeset: 476537:14859658f86c
user:      grant <grant%pkgsrc.org@localhost>
date:      Sun Jun 13 13:11:41 2004 +0000

description:
sync with src:

prevent integer underflow.  freebsd rev 1.32.  via openbsd

diffstat:

 textproc/nbsed/files/process.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 77b5d76bacfe -r 14859658f86c textproc/nbsed/files/process.c
--- a/textproc/nbsed/files/process.c    Sun Jun 13 13:09:34 2004 +0000
+++ b/textproc/nbsed/files/process.c    Sun Jun 13 13:11:41 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process.c,v 1.4 2003/10/16 12:04:41 grant Exp $        */
+/*     $NetBSD: process.c,v 1.5 2004/06/13 13:11:41 grant Exp $        */
 
 /*-
  * Copyright (c) 1992 Diomidis Spinellis.
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = "@(#)process.c  8.6 (Berkeley) 4/20/94";
 #else
-__RCSID("$NetBSD: process.c,v 1.4 2003/10/16 12:04:41 grant Exp $");
+__RCSID("$NetBSD: process.c,v 1.5 2004/06/13 13:11:41 grant Exp $");
 #endif
 #endif /* not lint */
 
@@ -593,7 +593,7 @@
        char c, *dst;
 
 #define        NEEDSP(reqlen)                                                  \
-       if (sp->len >= sp->blen - (reqlen) - 1) {                       \
+       if (sp->len + (reqlen) + 1 >= sp->blen) {                       \
                sp->blen += (reqlen) + 1024;                            \
                sp->space = sp->back = xrealloc(sp->back, sp->blen);    \
                dst = sp->space + sp->len;                              \



Home | Main Index | Thread Index | Old Index