[pcre-dev] [Bug 2308] Possible uninitialized memory usage in…

Páxina inicial
Borrar esta mensaxe
Autor: admin
Data:  
Para: pcre-dev
Asunto: [pcre-dev] [Bug 2308] Possible uninitialized memory usage in optimize_class_chars()
https://bugs.exim.org/show_bug.cgi?id=2308

--- Comment #6 from Petr Pisar <ppisar@???> ---
(In reply to Philip Hazel from comment #4)
> Might it be sensible to add a line such as "if (len == 0) return
> FALSE;" just to cover this? It would also, hopefully, stop static analyzers
> complaining.


I tried:

--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -5904,6 +5904,8 @@ for (i = 0; i < 32; i++)
i = 0;
j = 0;

+if (len == 0) return FALSE;
+
if (char_list[0] == 0)
{
i++;

And indeed the analyzer understood it and stopped complaining.

--
You are receiving this mail because:
You are on the CC list for the bug.