]> Savannah Git Hosting - gnulib.git/commit
mbs_endswith: Fix abort in the case of incomplete characters.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Jan 2025 14:19:46 +0000 (15:19 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Jan 2025 17:20:51 +0000 (18:20 +0100)
commit96b8b15ae5c3715520fa9ad80ca03e0e30803e50
tree0bb7982d73cec8de9e7f590626e74a8d0934e577
parent353dcc07d66b3645f779ed45b6c8210f5fef8b83
mbs_endswith: Fix abort in the case of incomplete characters.

Reported by Paul Eggert.

* lib/mbs_endswith.c: Don't include <stdlib.h>.
(mbs_endswith): Instead of aborting, return false.
* tests/test-mbs_endswith2.c (main): Test invalid and incomplete
characters.
ChangeLog
lib/mbs_endswith.c
tests/test-mbs_endswith2.c