[njs] Fixed potential buffer overread in String.prototype.match().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/476f7b3e617d branches: changeset: 2264:476f7b3e617d user: Dmitry Volyntsev date: Tue Jan 09 17:56:19 2024 -0800 description: Fixed potential buffer overread in String.prototype.match(). diffstat: src/njs_string.c | 2 +- 1 files changed, 1

Re: Core: Avoid memcpy from NULL

2024-01-09 Thread Maxim Dounin
Hello! On Tue, Jan 09, 2024 at 04:18:06PM +, Ben Kallus wrote: > > This demonstrates that your patch > > is clearly insufficient. Further, Vladimir's patch is clearly > > insufficient too, as shown for the another patch in the same > > patch series. > > "Insufficient" only when compared to

Re: [PATCH] Satisfy UBSan in njs

2024-01-09 Thread Dmitry Volyntsev
On 1/3/24 4:55 PM, Ben Kallus wrote: When I run my nginx+njs application with UBSan enabled, I encounter a few instances of undefined behavior in njs: 1. A memcpy from NULL 2. A couple of offsets applied to NULL 3. A u32 assigned to nan 4. A u32 assigned to inf This patch adds checks to

[njs] Avoiding arithmetic ops with NULL in %TypedArray%.prototype.sort().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/50c587f74a09 branches: changeset: 2263:50c587f74a09 user: Dmitry Volyntsev date: Tue Jan 09 09:14:42 2024 -0800 description: Avoiding arithmetic ops with NULL in %TypedArray%.prototype.sort(). Found by UndefinedBehaviorSanitizer. diffstat:

[njs] Avoiding casting Infinity to integer in String.fromCodePoint().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/f4cb0dc3e8ea branches: changeset: 2262:f4cb0dc3e8ea user: Dmitry Volyntsev date: Mon Jan 08 22:21:14 2024 -0800 description: Avoiding casting Infinity to integer in String.fromCodePoint(). Found by UndefinedBehaviorSanitizer. diffstat:

[njs] Avoiding arithmetic operations with NULL pointer in TextDecoder().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/5d2a3da0674f branches: changeset: 2261:5d2a3da0674f user: Dmitry Volyntsev date: Mon Jan 08 22:20:19 2024 -0800 description: Avoiding arithmetic operations with NULL pointer in TextDecoder(). Found by UndefinedBehaviorSanitizer. diffstat:

[njs] Avoiding casting NaN value to int64_t in njs.dump().

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/c15a6129ade7 branches: changeset: 2260:c15a6129ade7 user: Dmitry Volyntsev date: Mon Jan 08 22:20:10 2024 -0800 description: Avoiding casting NaN value to int64_t in njs.dump(). Found by UndefinedBehaviorSanitizer. diffstat: src/njs_json.c |

[njs] Avoiding pointer wraparound for padded integer specifier.

2024-01-09 Thread Dmitry Volyntsev
details: https://hg.nginx.org/njs/rev/e2c6451435a0 branches: changeset: 2259:e2c6451435a0 user: Dmitry Volyntsev date: Mon Jan 08 22:19:59 2024 -0800 description: Avoiding pointer wraparound for padded integer specifier. Previously, when integer was larger than the padded width in

Re: Core: Avoid memcpy from NULL

2024-01-09 Thread Ben Kallus
> This demonstrates that your patch > is clearly insufficient. Further, Vladimir's patch is clearly > insufficient too, as shown for the another patch in the same > patch series. "Insufficient" only when compared to a hypothetical perfectly exhaustive patch that requires "huge work," as you put

Re: [PATCH 4 of 6] Stream: the "deferred" parameter of the "listen" directive

2024-01-09 Thread Roman Arutyunyan
Hi, On Fri, Dec 15, 2023 at 07:37:47PM +0400, Sergey Kandaurov wrote: > # HG changeset patch > # User Sergey Kandaurov > # Date 1702650289 -14400 > # Fri Dec 15 18:24:49 2023 +0400 > # Node ID cca722e447f8beaaa6b41a620c8b4239a5d1aa7d > # Parent 4d90cb223fdb9e3e6c148726e36cec7835b2f0f8 >

Re: [PATCH 4 of 4] AIO operations now add timers (ticket #2162)

2024-01-09 Thread J Carter
Hello, On Tue, 9 Jan 2024 08:59:14 +0300 Maxim Dounin wrote: > Hello! > > On Mon, Jan 08, 2024 at 01:31:11PM +, J Carter wrote: > > > On Mon, 8 Jan 2024 11:25:55 + > > J Carter wrote: > > > > > Hello, > > > > > > On Mon, 27 Nov 2023 05:50:27 +0300 > > > Maxim Dounin wrote: > > >

Re: [PATCH 3 of 6] Stream: reshuffled ngx_stream_listen_opt_t fields

2024-01-09 Thread Roman Arutyunyan
Hi, On Fri, Dec 15, 2023 at 07:37:46PM +0400, Sergey Kandaurov wrote: > # HG changeset patch > # User Sergey Kandaurov > # Date 1702648226 -14400 > # Fri Dec 15 17:50:26 2023 +0400 > # Node ID 4d90cb223fdb9e3e6c148726e36cec7835b2f0f8 > # Parent de11f5373157db6c1e22dbad2ab4014143a5e8f8 >

Re: [PATCH 2 of 6] Overhauled some diagnostic messages missed in 1b05b9bbcebf

2024-01-09 Thread Roman Arutyunyan
Hi, On Fri, Dec 15, 2023 at 07:37:45PM +0400, Sergey Kandaurov wrote: > # HG changeset patch > # User Sergey Kandaurov > # Date 1702647536 -14400 > # Fri Dec 15 17:38:56 2023 +0400 > # Node ID de11f5373157db6c1e22dbad2ab4014143a5e8f8 > # Parent cb377d36446e1ce22b71848a4a138564b2e38719 >