1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

Corrects a few issues related to snprintf return values

This commit is contained in:
nnposter
2018-08-26 02:29:14 +00:00
parent d22dbc63b8
commit 973b471c11
4 changed files with 10 additions and 8 deletions

View File

@@ -196,7 +196,7 @@ int Vsnprintf(char *s, size_t n, const char *fmt, va_list ap) {
ret = vsnprintf(s, n, fmt, ap);
if (ret < 0 || (unsigned)ret >= n)
s[n - 1] = '\0';
s[n - 1] = '\0'; /* technically redundant */
return ret;
}