This commit is contained in:
cpq committed 2020-12-24 19:10:54 +00:00
1 parent 4c3b97be7d
commit b2ab484883
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -190,7 +190,7 @@ int mg_vasprintf(char **buf, size_t size, const char *fmt, va_list ap) {
}
// Microsoft version of vsnprintf() is not always null-terminated, so put
// the terminator manually
(*buf)[len] = 0;
if (*buf != NULL) (*buf)[len] = 0;
// LCOV_EXCL_STOP
} else if (len >= (int) size) {
/// Standard-compliant code path. Allocate a buffer that is large enough