diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-06-26 21:10:25 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-06-26 21:10:25 -0400 |
commit | a7b4445ceb1d355911a8a367b8db79b225094c43 (patch) | |
tree | a8c6db4710384cae3a8d8da228c018c1b8538c7f /mpfr.c | |
parent | 2b0495afae3d744127f3b6c18e98819feafbface (diff) | |
download | egawk-a7b4445ceb1d355911a8a367b8db79b225094c43.tar.gz egawk-a7b4445ceb1d355911a8a367b8db79b225094c43.tar.bz2 egawk-a7b4445ceb1d355911a8a367b8db79b225094c43.zip |
When checking for trailing spaces in numeric strings, avoid running off the end.
Diffstat (limited to 'mpfr.c')
-rw-r--r-- | mpfr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -327,7 +327,7 @@ force_mpnum(NODE *n, int do_nondec, int use_locale) IEEE_FMT(n->mpg_numbr, tval); done: /* trailing space is OK for NUMBER */ - while (isspace((unsigned char) *ptr)) + while (ptr < cpend && isspace((unsigned char) *ptr)) ptr++; *cpend = save; if (errno == 0 && ptr == cpend) |