From 28071e660817071aca1aff49137e215ac4f00b49 Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Wed, 6 Aug 2025 11:35:09 -0300 Subject: [PATCH] detect/bytetest: prevent lto uninitialized error 'nbytes' may be used uninitialized [-Werror=maybe-uninitialized] 532 | if (!DetectBytetestValidateNbytes(data, nbytes, optstr)) { | ^ detect-bytetest.c:336:14: note: 'nbytes' was declared here 336 | uint32_t nbytes; | ^ --- src/detect-bytetest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-bytetest.c b/src/detect-bytetest.c index 27070ffa36..c8325cd1c4 100644 --- a/src/detect-bytetest.c +++ b/src/detect-bytetest.c @@ -333,7 +333,7 @@ static DetectBytetestData *DetectBytetestParse( int res = 0; size_t pcre2_len; int i; - uint32_t nbytes; + uint32_t nbytes = 0; const char *str_ptr = NULL; pcre2_match_data *match = NULL; -- 2.47.2