From a7b4445ceb1d355911a8a367b8db79b225094c43 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 26 Jun 2016 21:10:25 -0400 Subject: When checking for trailing spaces in numeric strings, avoid running off the end. --- node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node.c') diff --git a/node.c b/node.c index 39c25dfd..58b54561 100644 --- a/node.c +++ b/node.c @@ -136,7 +136,7 @@ r_force_number(NODE *n) } /* POSIX says trailing space is OK for NUMBER */ - while (isspace((unsigned char) *ptr)) + while (ptr < cpend && isspace((unsigned char) *ptr)) ptr++; if (errno == 0) { -- cgit v1.2.3