mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-10 06:11:36 +00:00
Make sure to specify buffer size large enough for NULL terminator
This commit is contained in:
1 parent
652e875db2
commit
e3bc5bb84b
1 file changed
+1
-2
@@ -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