From a17927ad627c81790d1a5c80a88f275aab128c2e Mon Sep 17 00:00:00 2001 From: Vadim Zhestikov Date: Wed, 22 Mar 2023 09:36:58 -0700 Subject: [PATCH] Fixed invalid NULL pointer check. This fixes Coverity issues CID 1524495 and CID 1524494. --- src/njs_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/njs_parser.c b/src/njs_parser.c index f5f3b626..43ee69b9 100644 --- a/src/njs_parser.c +++ b/src/njs_parser.c @@ -8030,8 +8030,8 @@ njs_parser_export(njs_parser_t *parser, njs_lexer_token_t *token, return NJS_DONE; } - peek = njs_lexer_peek_token(parser->lexer, peek, 1); - if (njs_slow_path(token == NULL)) { + peek = njs_lexer_peek_token(parser->lexer, peek, 0); + if (njs_slow_path(peek == NULL)) { return NJS_ERROR; } -- 2.47.3