Re: regcomp() signedness issues
[email protected] (Christos Zoulas) Wed, 1 Jan 2025 18:21:36 -0000 (UTC)
| Newsgroups | gmane.os.netbsd.devel.userlevel |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]>, RVP <[email protected]> wrote: >On Sat, 28 Dec 2024, Christos Zoulas wrote: > >> In article ><CAJgzZooHNebuUuEYghmrAYn+uh425PSYDSgge0BvaXnCeKGd5A@mail.gmail.com>, >> enh <[email protected]> wrote: >>> -=-=-=-=-=- >>> >>> a trivial fuzzer someone once wrote blew up on this input to regcomp() >>> [passed directly to regcomp() after adding a trailing '\0']: >>> >>> xxd >>> ~~/Downloads/clusterfuzz-testcase-minimized-regexec_fuzzer-5459313584832512 >>> 00000000: 6a3a 5b5d 6a3a 5b5d 6a3a 5bd9 6a3a 5b5d j:[]j:[]j:[.j:[] >>> >> >> I can't reproduce this in current: >> >> if ((e = regcomp(&re, "j:[]j:[]j:[.j:[]", REG_EXTENDED)) != 0) { >> >> > >Ah, I see what's wrong: it's 0xD9 instead of 0x2E (.) in the pattern. Thanks! Added test and committed the fix. christos