sqlean
sqlean copied to clipboard
Fix buffer overflow in soundex library
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.