]> Savannah Git Hosting - gnulib.git/commit
vasnprintf-posix: Fix negative width handling for %ls directive.
authorBruno Haible <bruno@clisp.org>
Sat, 28 Jan 2023 17:17:17 +0000 (18:17 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 28 Jan 2023 17:17:17 +0000 (18:17 +0100)
commit5527d5c548702b89d217bbe58036996066a709b6
treef2efc482f4c9df14931d6c7225f14bf4206ecdc9
parent73aff324e88c312e39e06e41846a355349e57271
vasnprintf-posix: Fix negative width handling for %ls directive.

Reported by clang via Po Lu <luangruo@yahoo.com>.

* lib/vasnprintf.c (VASNPRINTF): In the code for %ls in vasnprintf and
for %s in vasnwprintf, test for the FLAG_LEFT bit in the flags variable.
* tests/test-vasnprintf-posix.c (test_function): Add tests for width
given as argument for the directives %s, %ls.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.
ChangeLog
lib/vasnprintf.c
tests/test-snprintf-posix.h
tests/test-sprintf-posix.h
tests/test-vasnprintf-posix.c
tests/test-vasprintf-posix.c