| Index: vm/os_win.cc
|
| ===================================================================
|
| --- vm/os_win.cc (revision 9556)
|
| +++ vm/os_win.cc (working copy)
|
| @@ -155,7 +155,11 @@
|
|
|
| int OS::VSNPrint(char* str, size_t size, const char* format, va_list args) {
|
| if (str == NULL || size == 0) {
|
| - return _vscprintf(format, args);
|
| + int retval = _vscprintf(format, args);
|
| + if (retval < 0) {
|
| + FATAL1("Fatal error in OS::VSNPrint with format '%s'", format);
|
| + }
|
| + return retval;
|
| }
|
| va_list args_copy;
|
| va_copy(args_copy, args);
|
| @@ -168,6 +172,9 @@
|
| va_list args_retry;
|
| va_copy(args_retry, args);
|
| written = _vscprintf(format, args_retry);
|
| + if (written < 0) {
|
| + FATAL1("Fatal error in OS::VSNPrint with format '%s'", format);
|
| + }
|
| va_end(args_retry);
|
| }
|
| // Make sure to zero-terminate the string if the output was
|
|
|