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