We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 758d99b commit bc1647aCopy full SHA for bc1647a
include/swift/Runtime/Portability.h
@@ -46,7 +46,7 @@ swift_vasprintf(char **strp, const char *fmt, va_list args) {
46
char *buffer = reinterpret_cast<char *>(malloc(len + 1));
47
if (!buffer)
48
return -1;
49
- int result = vsprintf(buffer, fmt, args);
+ int result = vsnprintf(buffer, len + 1, fmt, args);
50
if (result < 0) {
51
free(buffer);
52
0 commit comments