sqlean icon indicating copy to clipboard operation
sqlean copied to clipboard

Fix buffer overflow in soundex library

Open skeeto opened this issue 2 years ago • 0 comments

No space was allocated for the null terminator in the result buffer. ASan catches this error when running the tests.

There's a potential issue that d (and i) will overflow, computing an incorrect result, except that they're tied to a VLA and the program would crash via stack overflow well before that point. Especially considering the VLAs (#58), this soundex library is questionable and probably shouldn't be used on untrusted input without careful review and fixes, and VLA removal.

skeeto avatar Dec 12 '22 18:12 skeeto