Welcome! Log In Create A New Profile

Advanced

[njs] Fixed use-of-uninitialized-value while tracking rejected promises.

Dmitry Volyntsev
June 08, 2021 02:00PM
details: https://hg.nginx.org/njs/rev/06204b343066
branches:
changeset: 1653:06204b343066
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Tue Jun 08 12:43:13 2021 +0000
description:
Fixed use-of-uninitialized-value while tracking rejected promises.

Found by Found by MemorySanitizer.

diffstat:

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

diffs (12 lines):

diff -r 45b9af3f911f -r 06204b343066 src/njs_promise.c
--- a/src/njs_promise.c Sat Jun 05 11:55:08 2021 +0000
+++ b/src/njs_promise.c Tue Jun 08 12:43:13 2021 +0000
@@ -570,7 +570,7 @@ njs_promise_host_rejection_tracker(njs_v
length = vm->promise_reason->length;

for (i = 0; i < length; i++) {
- if (memcmp(&value[i], &data->result, sizeof(njs_value_t)) == 0) {
+ if (njs_values_same(&value[i], &data->result)) {
length--;

if (i < length) {
_______________________________________________
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 while tracking rejected promises.

Dmitry Volyntsev 131 June 08, 2021 02:00PM



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

Online Users

Guests: 58
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready