Welcome! Log In Create A New Profile

Advanced

[njs] Fixed invalid NULL pointer check.

Vadim Zhestikov via nginx-devel
March 22, 2023 12:40PM
details: https://hg.nginx.org/njs/rev/8e6a2cb0c23d
branches:
changeset: 2075:8e6a2cb0c23d
user: Vadim Zhestikov <v.zhestikov@f5.com>
date: Wed Mar 22 09:36:58 2023 -0700
description:
Fixed invalid NULL pointer check.

This fixes Coverity issues CID 1524495 and CID 1524494.

diffstat:

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

diffs (14 lines):

diff -r edf1c2aef957 -r 8e6a2cb0c23d src/njs_parser.c
--- a/src/njs_parser.c Mon Mar 20 21:25:47 2023 -0700
+++ b/src/njs_parser.c Wed Mar 22 09:36:58 2023 -0700
@@ -8030,8 +8030,8 @@ njs_parser_export(njs_parser_t *parser,
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;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed invalid NULL pointer check.

Vadim Zhestikov via nginx-devel 638 March 22, 2023 12:40PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 115
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready