[njs] Silenced Coverity false-positive NULL-pointer dereference warning.
Dmitry Volyntsev
xeioex at nginx.com
Tue Jul 7 12:25:26 UTC 2020
details: https://hg.nginx.org/njs/rev/ceb8f0dcf48b
branches:
changeset: 1454:ceb8f0dcf48b
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Tue Jul 07 12:23:44 2020 +0000
description:
Silenced Coverity false-positive NULL-pointer dereference warning.
Found by Coverity (CID 1463869).
diffstat:
src/njs_parser.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r 7a8e3f0d52a6 -r ceb8f0dcf48b src/njs_parser.c
--- a/src/njs_parser.c Tue Jul 07 12:23:42 2020 +0000
+++ b/src/njs_parser.c Tue Jul 07 12:23:44 2020 +0000
@@ -1799,6 +1799,9 @@ njs_parser_property_name(njs_parser_t *p
if (consume > 1) {
token = njs_lexer_token(parser->lexer, 0);
+ if (token == NULL) {
+ return NJS_ERROR;
+ }
property = njs_parser_property_name_node(parser, token);
if (property == NULL) {
More information about the nginx-devel
mailing list