Is. #800 - ensure string is null terminated

This commit is contained in:
Geoff McLane 2021-04-15 16:36:06 +02:00
parent fc1943e57b
commit a91ebf642b

View file

@ -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! */
} }