mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
Fix #954
This commit is contained in:
1 parent
4c3b97be7d
commit
b2ab484883
2 files changed
+2
-2
No files matched your search
+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
|
// Microsoft version of vsnprintf() is not always null-terminated, so put
|
||||||
// the terminator manually
|
// the terminator manually
|
||||||
(*buf)[len] = 0;
|
if (*buf != NULL) (*buf)[len] = 0;
|
||||||
// LCOV_EXCL_STOP
|
// LCOV_EXCL_STOP
|
||||||
} else if (len >= (int) size) {
|
} else if (len >= (int) size) {
|
||||||
/// Standard-compliant code path. Allocate a buffer that is large enough
|
/// 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
|
// Microsoft version of vsnprintf() is not always null-terminated, so put
|
||||||
// the terminator manually
|
// the terminator manually
|
||||||
(*buf)[len] = 0;
|
if (*buf != NULL) (*buf)[len] = 0;
|
||||||
// LCOV_EXCL_STOP
|
// LCOV_EXCL_STOP
|
||||||
} else if (len >= (int) size) {
|
} else if (len >= (int) size) {
|
||||||
/// Standard-compliant code path. Allocate a buffer that is large enough
|
/// Standard-compliant code path. Allocate a buffer that is large enough
|
||||||
|
|||||||
Reference in new issue
Block a user