[njs] Fixed possible buffer overrun during numbers parsing.
Dmitry Volyntsev
xeioex at nginx.com
Mon Jun 5 12:03:42 UTC 2017
details: http://hg.nginx.org/njs/rev/a782bc08b927
branches:
changeset: 350:a782bc08b927
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Wed May 31 20:42:15 2017 +0300
description:
Fixed possible buffer overrun during numbers parsing.
diffstat:
njs/njs_number.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 559d256dd65b -r a782bc08b927 njs/njs_number.c
--- a/njs/njs_number.c Wed May 31 20:36:01 2017 +0300
+++ b/njs/njs_number.c Wed May 31 20:42:15 2017 +0300
@@ -101,7 +101,7 @@ njs_number_dec_parse(u_char **start, u_c
p++;
}
- if (*p == '.') {
+ if (p < end && *p == '.') {
frac = 0;
scale = 1;
More information about the nginx-devel
mailing list