Is. #800 - ensure string is null terminated
This commit is contained in:
parent
fc1943e57b
commit
a91ebf642b
|
@ -643,6 +643,7 @@ static struct printfArg* BuildArgArray( TidyDocImpl *doc, ctmbstr fmt, va_list a
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strncpy(nas[cn].format, fmt + nas[cn].formatStart, nas[cn].formatLength);
|
strncpy(nas[cn].format, fmt + nas[cn].formatStart, nas[cn].formatLength);
|
||||||
|
nas[cn].format[nas[cn].formatLength] = 0; /* Is. #800 - If count <= srcLen, no 0 added! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue