forked from github/server
CID 22597: va_start/va_end mismatch
This commit is contained in:
parent
77ad91f8a4
commit
d3f7bd7b10
|
@ -119,12 +119,11 @@ size_t slprintf(char * dst, size_t size, const char * format, ...)
|
|||
|
||||
va_start(args, format);
|
||||
result = vsnprintf(dst, size, format, args);
|
||||
va_end(args);
|
||||
if (result < 0 || result >= (int)size) {
|
||||
dst[size - 1] = '\0';
|
||||
return size;
|
||||
}
|
||||
va_start(args, format);
|
||||
va_end(args);
|
||||
|
||||
return (size_t)result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue