Fixed NULL handling in CharacterString sprintf which caused endless loop. (#1189)

This commit is contained in:
Steve Karg
2025-12-13 11:50:22 -06:00
committed by GitHub
parent b8bf498e57
commit 2c3c1c7bb8
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -2099,6 +2099,10 @@ int bacapp_snprintf_character_string(
retry with the next one. */
wclen = 1;
wc = L'?';
} else if (wclen == 0) {
/* Null wide character */
wc = L'.';
wclen = 1;
} else {
if (!iswprint(wc)) {
wc = L'.';