Module Name: src
Committed By: kre
Date: Mon Jul 30 22:58:09 UTC 2018
Modified Files:
src/usr.bin/m4: eval.c
Log Message:
Avoid an infinite loop caused by a line accidentally dropped
in 1.22 (almost 30 months ago!)
[ Discovered by rhialto@ ]
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 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.26 src/usr.bin/m4/eval.c:1.27
--- src/usr.bin/m4/eval.c:1.26 Mon Oct 23 02:38:46 2017
+++ src/usr.bin/m4/eval.c Mon Jul 30 22:58:09 2018
@@ -1,5 +1,5 @@
/* $OpenBSD: eval.c,v 1.66 2008/08/21 21:01:47 espie Exp $ */
-/* $NetBSD: eval.c,v 1.26 2017/10/23 02:38:46 christos Exp $ */
+/* $NetBSD: eval.c,v 1.27 2018/07/30 22:58:09 kre Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
#include "nbtool_config.h"
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: eval.c,v 1.26 2017/10/23 02:38:46 christos Exp $");
+__RCSID("$NetBSD: eval.c,v 1.27 2018/07/30 22:58:09 kre Exp $");
#include <sys/types.h>
#include <ctype.h>
@@ -987,6 +987,7 @@ map(char *dest, const char *src, const c
}
} else {
while (*src) {
+ sch = (unsigned char)(*src++);
dch = mapvec[sch];
while (dch != sch) {
sch = dch;