Module Name: src
Committed By: martin
Date: Wed Apr 11 14:27:51 UTC 2018
Modified Files:
src/usr.bin/m4 [netbsd-8]: eval.c
Log Message:
Pull up following revision(s) (requested by mrg in ticket #732):
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.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.8.1 src/usr.bin/m4/eval.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/m4/eval.c
diff -u src/usr.bin/m4/eval.c:1.24 src/usr.bin/m4/eval.c:1.24.8.1
--- src/usr.bin/m4/eval.c:1.24 Sat Jan 16 16:56:21 2016
+++ src/usr.bin/m4/eval.c Wed Apr 11 14:27:51 2018
@@ -1,5 +1,5 @@
/* $OpenBSD: eval.c,v 1.66 2008/08/21 21:01:47 espie Exp $ */
-/* $NetBSD: eval.c,v 1.24 2016/01/16 16:56:21 christos Exp $ */
+/* $NetBSD: eval.c,v 1.24.8.1 2018/04/11 14:27:51 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.24 2016/01/16 16:56:21 christos Exp $");
+__RCSID("$NetBSD: eval.c,v 1.24.8.1 2018/04/11 14:27:51 martin Exp $");
#include <sys/types.h>
#include <ctype.h>
@@ -698,6 +698,8 @@ static void
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)