Source-Changes-HG archive

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

[src/trunk]: src/bin/sh Another ancient (highly improbable) bug bites the dus...



details:   https://anonhg.NetBSD.org/src/rev/3f796cf5abc3
branches:  trunk
changeset: 824964:3f796cf5abc3
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Jun 24 11:23:35 2017 +0000

description:
Another ancient (highly improbable) bug bites the dust.   This one
caused by incorrect macro usage (ie: using the wrong one) which has
been in the sources since version 1.1 (ie: forever).

Like the previous (STACKSTRNUL) bug, the probability of this one
actually occurring has been infinitesimal but the LINENO code increases
that to infinitesimal and a smidgen... (or a few, depending upon usage).

Still, apparently that was enough, Kamil Rytarowski discovered that the
zsh configure script (damn competition!) managed to trigger this problem.

diffstat:

 bin/sh/parser.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 95ef30672dd4 -r 3f796cf5abc3 bin/sh/parser.c
--- a/bin/sh/parser.c   Sat Jun 24 11:09:42 2017 +0000
+++ b/bin/sh/parser.c   Sat Jun 24 11:23:35 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parser.c,v 1.138 2017/06/17 07:22:12 kre Exp $ */
+/*     $NetBSD: parser.c,v 1.139 2017/06/24 11:23:35 kre Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c   8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.138 2017/06/17 07:22:12 kre Exp $");
+__RCSID("$NetBSD: parser.c,v 1.139 2017/06/24 11:23:35 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -1495,11 +1495,11 @@
        parsebackquote = savepbq;
        handler = savehandler;
        if (arinest || ISDBLQUOTE()) {
-               USTPUTC(CTLBACKQ | CTLQUOTE, out);
+               STPUTC(CTLBACKQ | CTLQUOTE, out);
                while (--lno >= 0)
-                       USTPUTC(CTLNONL, out);
+                       STPUTC(CTLNONL, out);
        } else
-               USTPUTC(CTLBACKQ, out);
+               STPUTC(CTLBACKQ, out);
 
        return out;
 }



Home | Main Index | Thread Index | Old Index