wxWidgets/tests/strings
Vadim Zeitlin 344cc940a0 Impose upper limit on memory allocation in wxString::PrintfV()
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>
2020-12-01 21:53:55 +01:00
..
crt.cpp Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
hexconv.cpp Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
iostream.cpp Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
numformatter.cpp Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
stdstrings.cpp Disable tests not working in ANSI build 2020-10-18 23:47:29 +02:00
strings.cpp Disable tests not working in ANSI build 2020-10-18 23:47:29 +02:00
tokenizer.cpp Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
unichar.cpp Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
unicode.cpp Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
vararg.cpp Impose upper limit on memory allocation in wxString::PrintfV() 2020-12-01 21:53:55 +01:00
vsnprintf.cpp Always return -1 but set errno in our wxVsnprintf() on error 2020-12-01 21:53:55 +01:00