Source-Changes-HG archive

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

[src/netbsd-8]: src/bin/sh Pull up following revision(s) (requested by kre in...



details:   https://anonhg.NetBSD.org/src/rev/d92927dbedac
branches:  netbsd-8
changeset: 445769:d92927dbedac
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Nov 12 08:46:54 2018 +0000

description:
Pull up following revision(s) (requested by kre in ticket #1086):

        bin/sh/parser.c: revision 1.152

PR bin/53712

Avoid crash from redirect on null compound command.

diffstat:

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

diffs (27 lines):

diff -r 6146934fcdcf -r d92927dbedac bin/sh/parser.c
--- a/bin/sh/parser.c   Thu Nov 08 12:11:27 2018 +0000
+++ b/bin/sh/parser.c   Mon Nov 12 08:46:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parser.c,v 1.132.2.6 2018/09/10 15:45:11 martin Exp $  */
+/*     $NetBSD: parser.c,v 1.132.2.7 2018/11/12 08:46:54 martin 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.132.2.6 2018/09/10 15:45:11 martin Exp $");
+__RCSID("$NetBSD: parser.c,v 1.132.2.7 2018/11/12 08:46:54 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -597,7 +597,7 @@
        tokpushback++;
        *rpp = NULL;
        if (redir) {
-               if (n1->type != NSUBSHELL) {
+               if (n1 == NULL || n1->type != NSUBSHELL) {
                        n2 = stalloc(sizeof(struct nredir));
                        n2->type = NREDIR;
                        n2->nredir.n = n1;



Home | Main Index | Thread Index | Old Index