mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-12 10:13:29 +00:00
Fix #954
This commit is contained in:
+1
-1
@@ -3733,7 +3733,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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user