Welcome! Log In Create A New Profile

Advanced

[njs] Fixed Buffer.prototype.indexOf() on 32bits platforms.

Anonymous User
October 10, 2024 09:30PM
details: https://github.com/nginx/njs/commit/6902aaa17d8a2f30c44f2ed0ed165605233a2c6d
branches: master
commit: 6902aaa17d8a2f30c44f2ed0ed165605233a2c6d
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Thu, 10 Oct 2024 16:33:13 -0700
description:
Fixed Buffer.prototype.indexOf() on 32bits platforms.


---
src/njs_buffer.c | 2 +-
src/qjs_buffer.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/njs_buffer.c b/src/njs_buffer.c
index 2f0fc620..3ce1b90a 100644
--- a/src/njs_buffer.c
+++ b/src/njs_buffer.c
@@ -2198,7 +2198,7 @@ encoding:
}

} else {
- to -= str.length - 1;
+ to -= (int64_t) str.length - 1;

if (from > to) {
goto done;
diff --git a/src/qjs_buffer.c b/src/qjs_buffer.c
index 02618387..9f451e26 100644
--- a/src/qjs_buffer.c
+++ b/src/qjs_buffer.c
@@ -1071,7 +1071,7 @@ encoding:
}

} else {
- to -= str.length - 1;
+ to -= (int64_t) str.length - 1;

if (from > to) {
goto done;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed Buffer.prototype.indexOf() on 32bits platforms.

Anonymous User 194 October 10, 2024 09:30PM



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

Online Users

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