Welcome! Log In Create A New Profile

Advanced

[njs] Fixed use-of-uninitialized-value in njs_string_index().

Dmitry Volyntsev
June 11, 2021 02:30PM
details: https://hg.nginx.org/njs/rev/db7696b86a9c
branches:
changeset: 1659:db7696b86a9c
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Jun 11 18:28:21 2021 +0000
description:
Fixed use-of-uninitialized-value in njs_string_index().

Found by MemorySanitizer.

diffstat:

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

diffs (12 lines):

diff -r a0f5719c8d9a -r db7696b86a9c src/njs_string.c
--- a/src/njs_string.c Fri Jun 11 15:47:37 2021 +0000
+++ b/src/njs_string.c Fri Jun 11 18:28:21 2021 +0000
@@ -2565,7 +2565,7 @@ njs_string_index(njs_string_prop_t *stri
last = 0;
index = 0;

- if (string->length >= NJS_STRING_MAP_STRIDE) {
+ if (string->length > NJS_STRING_MAP_STRIDE) {

end = string->start + string->size;
map = njs_string_map_start(end);
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed use-of-uninitialized-value in njs_string_index().

Dmitry Volyntsev 358 June 11, 2021 02:30PM



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

Online Users

Guests: 121
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