Don't loop indefinitely until we run out of memory, possibly after wrapping around INT_MAX, but impose an arbitrary limit of 128MiB for the max allocation done by wxString::PrintfV() when the provided format string or one of the arguments are invalid. This notably fixes a crash when trying to use "%c" to output an invalid Unicode character. Also improve comment explaining DoStringPrintfV() logic and change the size type to size_t from int. Co-Authored-By: Arrigo Marchiori <ardovm@yahoo.it> |
||
|---|---|---|
| .. | ||
| crt.cpp | ||
| hexconv.cpp | ||
| iostream.cpp | ||
| numformatter.cpp | ||
| stdstrings.cpp | ||
| strings.cpp | ||
| tokenizer.cpp | ||
| unichar.cpp | ||
| unicode.cpp | ||
| vararg.cpp | ||
| vsnprintf.cpp | ||