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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user