]> git.ipfire.org Git - thirdparty/curl.git/commit
checksrc: fix possible endless loop when detecting `BANNEDFUNC`
authorViktor Szakats <commit@vsz.me>
Mon, 29 Sep 2025 23:46:33 +0000 (01:46 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 30 Sep 2025 09:32:12 +0000 (11:32 +0200)
commitdd37d6970cfd8b4cf47ebd469f03772813b92c23
tree08d741502c266392575c0ee90ba1dd6704618843
parent20142f5d06f7120ba94cbcc25c998e8d81aec85b
checksrc: fix possible endless loop when detecting `BANNEDFUNC`

If the source line had square brackets before the match, the stripping
of the banned function left the original line intact, and repeated the
check on it forever. E.g. with banned function `open` in `lib518.c`:
```c
t518_testfd[0] = open(DEV_NULL, O_RDONLY);
```

Closes #18775
scripts/checksrc.pl