mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-14 05:50:51 +00:00
Make sure to specify buffer size large enough for NULL terminator
This commit is contained in:
@@ -303,10 +303,9 @@ namespace StringFormat
|
||||
int size = StringFormat::vsnprintf(NULL, 0, format, args2);
|
||||
|
||||
char *buf = new char[size+1];
|
||||
StringFormat::vsnprintf(buf, size+1, format, args);
|
||||
buf[size] = 0;
|
||||
|
||||
StringFormat::vsnprintf(buf, size, format, args);
|
||||
|
||||
va_end(args);
|
||||
va_end(args2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user