string append more protection

This commit is contained in:
2024-05-13 22:29:22 +03:00
parent d764171c82
commit f97fed7daa
2 changed files with 2 additions and 1 deletions

View File

@@ -300,6 +300,7 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) {
if (s == 0) return;
int old_sz = size_s();
if (s == -1) s = strlen(c);
if (s <= 0) return;
#ifdef PIP_ICU
UErrorCode e((UErrorCode)0);
UConverter * cc = ucnv_open(codepage, &e);