Hello, Willy! couple of patches in the queue.
CI part will be added later вс, 31 мая 2026 г. в 06:39, Willy Tarreau <[email protected]>: > Hi Ilya, > > On Fri, May 29, 2026 at 02:15:17PM +0200, you wrote: > > gentle ping > > sorry, we apparently missed them in the middle of the recent noise. > I picked them and squashed the last two since apparently they fix > similar stuff in the same file without indication of any particular > difference. > > Some questions though, what compiler did report these errors ? We're > noit seeing them in the CI with either gcc or clang. Or did you use > any extra warnings that we don't enable by default ? > > I have not yet pushed the patches so if you have any info to share, > I can amend the patches. > > Thanks, > willy >
From 7daf06eb9f02b5b6ba8642ea7115c43c543117b9 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin <[email protected]> Date: Sun, 31 May 2026 09:14:39 +0200 Subject: [PATCH 1/2] isrc/ncbmbuf.c: improve memory allocation handling src/ncbmbuf.c:192:9: warning: If memory allocation fails, then there is a possible null pointer dereference: area [nullPointerOutOfMemory] src/ncbmbuf.c:373:9: warning: If memory allocation fails, then there is a possible null pointer dereference: data [nullPointerOutOfMemory] src/ncbmbuf.c:546:9: warning: If memory allocation fails, then there is a possible null pointer dereference: data [nullPointerOutOfMemory] --- src/ncbmbuf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ncbmbuf.c b/src/ncbmbuf.c index 222737ea6..e642e3d21 100644 --- a/src/ncbmbuf.c +++ b/src/ncbmbuf.c @@ -370,6 +370,12 @@ void test_ncbmb(void) char *data = calloc(16384, 1); struct ncbmbuf buf; + if (!area || !data) { + free(area); + free(data); + return; + } + memset(data, 0x11, 16384); /* 7 bytes data // 1 byte bitmap (0xfe) */ @@ -543,6 +549,12 @@ void test_ngtcp2_crypto(void) char *data = calloc(16384, 1); struct ncbmbuf buf; + if (!area || !data) { + free(area); + free(data); + return; + } + memset(data, 0x11, 16384); buf = ncbmb_make(area, 16384, 0); -- 2.46.0.windows.1
From 17a453ce8e455bc60332555dea93a5882b9d618b Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin <[email protected]> Date: Sun, 31 May 2026 09:19:21 +0200 Subject: [PATCH] admin/halog/halog.c: improve memory allocation handling admin/halog/halog.c:1805:2: warning: If memory allocation fails, then there is a possible null pointer dereference: ustat [nullPointerOutOfMemory] admin/halog/halog.c:1806:2: warning: If memory allocation fails, then there is a possible null pointer dereference: ustat [nullPointerOutOfMemory] admin/halog/halog.c:1809:2: warning: If memory allocation fails, then there is a possible null pointer dereference: ustat [nullPointerOutOfMemory] admin/halog/halog.c:1810:2: warning: If memory allocation fails, then there is a possible null pointer dereference: ustat [nullPointerOutOfMemory] admin/halog/halog.c:1814:2: warning: If memory allocation fails, then there is a possible null pointer dereference: ustat [nullPointerOutOfMemory] --- admin/halog/halog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/halog/halog.c b/admin/halog/halog.c index 5b6296033..52986849f 100644 --- a/admin/halog/halog.c +++ b/admin/halog/halog.c @@ -1801,6 +1801,8 @@ void filter_count_ip(const char *source_field, const char *accept_field, const c */ if (unlikely(!ustat)) ustat = calloc(1, sizeof(*ustat)); + if (!ustat) + return; ustat->nb_err = err; ustat->nb_req = 1; -- 2.46.0.windows.1

