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/77b5d76bacfe
branches:  trunk
changeset: 476536:77b5d76bacfe
user:      grant <grant%pkgsrc.org@localhost>
date:      Sun Jun 13 13:09:34 2004 +0000

description:
sync with src:

apply patch in PR to fix argument parsing bug.
apply patch in PR to avoid writing to unallocated memory.

diffstat:

 textproc/nbsed/files/compile.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 538af418b1dd -r 77b5d76bacfe textproc/nbsed/files/compile.c
--- a/textproc/nbsed/files/compile.c    Sun Jun 13 13:07:29 2004 +0000
+++ b/textproc/nbsed/files/compile.c    Sun Jun 13 13:09:34 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compile.c,v 1.3 2004/06/13 13:04:02 grant Exp $        */
+/*     $NetBSD: compile.c,v 1.4 2004/06/13 13:09:34 grant Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -77,7 +77,7 @@
 #if 0
 static char sccsid[] = "@(#)compile.c  8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: compile.c,v 1.3 2004/06/13 13:04:02 grant Exp $");
+__RCSID("$NetBSD: compile.c,v 1.4 2004/06/13 13:09:34 grant Exp $");
 #endif
 #endif /* not lint */
 
@@ -606,6 +606,7 @@
                        gn = 1;
                        /* XXX Check for overflow */
                        s->n = (int)strtol(p, &p, 10);
+                       p--;
                        break;
                case 'w':
                        p++;
@@ -670,7 +671,7 @@
                return (NULL);
        }
        /* We assume characters are 8 bits */
-       lt = xmalloc(UCHAR_MAX);
+       lt = xmalloc(UCHAR_MAX+1);
        for (i = 0; i <= UCHAR_MAX; i++)
                lt[i] = (char)i;
        for (op = old, np = new; *op; op++, np++)



Home | Main Index | Thread Index | Old Index