[njs] Fixed potential NULL-pointer dereference added in 86f55a7dc4a4.

Alexander Borisov alexander.borisov at nginx.com
Mon Jun 1 15:11:03 UTC 2020


details:   https://hg.nginx.org/njs/rev/c9f07d5eef98
branches:  
changeset: 1409:c9f07d5eef98
user:      Alexander Borisov <alexander.borisov at nginx.com>
date:      Mon Jun 01 18:09:27 2020 +0300
description:
Fixed potential NULL-pointer dereference added in 86f55a7dc4a4.

Found by Coverity (CID 1463867).

diffstat:

 src/njs_parser.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r d255e73aed3b -r c9f07d5eef98 src/njs_parser.c
--- a/src/njs_parser.c	Fri May 29 19:29:59 2020 +0000
+++ b/src/njs_parser.c	Mon Jun 01 18:09:27 2020 +0300
@@ -5383,7 +5383,7 @@ njs_parser_for_in_statement(njs_parser_t
     }
 
     forin = njs_parser_node_new(parser, NJS_TOKEN_FOR_IN);
-    if (node == NULL) {
+    if (forin == NULL) {
         return NJS_ERROR;
     }
 


More information about the nginx-devel mailing list