Source-Changes-HG archive

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

[src/netbsd-7]: src/usr.bin/m4 Pull up following revision(s) (requested by mr...



details:   https://anonhg.NetBSD.org/src/rev/a2a5bd56502c
branches:  netbsd-7
changeset: 800452:a2a5bd56502c
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Mar 21 12:08:43 2018 +0000

description:
Pull up following revision(s) (requested by mrg in ticket #1587):
        usr.bin/m4/eval.c: revision 1.25
        usr.bin/m4/eval.c: revision 1.26
PR/52638: matthew green: missing argument check causes m4 to core in ifelse()

remove the braces I accidentally added.

diffstat:

 usr.bin/m4/eval.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 6e4ac90b5e6a -r a2a5bd56502c usr.bin/m4/eval.c
--- a/usr.bin/m4/eval.c Wed Mar 21 12:04:35 2018 +0000
+++ b/usr.bin/m4/eval.c Wed Mar 21 12:08:43 2018 +0000
@@ -1,5 +1,5 @@
 /*     $OpenBSD: eval.c,v 1.66 2008/08/21 21:01:47 espie Exp $ */
-/*     $NetBSD: eval.c,v 1.22 2011/08/21 23:38:43 dholland Exp $       */
+/*     $NetBSD: eval.c,v 1.22.20.1 2018/03/21 12:08:43 martin Exp $    */
 
 /*
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
 #include "nbtool_config.h"
 #endif
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: eval.c,v 1.22 2011/08/21 23:38:43 dholland Exp $");
+__RCSID("$NetBSD: eval.c,v 1.22.20.1 2018/03/21 12:08:43 martin Exp $");
 
 #include <sys/types.h>
 #include <err.h>
@@ -687,6 +687,8 @@
 doifelse(const char *argv[], int argc)
 {
        cycle {
+               if (argc < 5)
+                       m4errx(1, "wrong number of args for ifelse");
                if (STREQ(argv[2], argv[3]))
                        pbstr(argv[4]);
                else if (argc == 6)



Home | Main Index | Thread Index | Old Index