Add code annotation to silence false positive warnings from covscan
due to omitting termination \0.
buffer_size: Calling strncpy with a source string whose length (13 chars) is greater than or equal to the size argument (13) will fail to null-terminate "&tmp[cs]".
}
if (format)
+ /* coverity[buffer_size] */
strncpy(&tmp[cs], "<replaceable>", len);
else
+ /* coverity[buffer_size] */
strncpy(&tmp[cs], "<", len);
cs += len;
}
if (format)
+ /* coverity[buffer_size] */
strncpy(&tmp[cs], "</replaceable>", len);
else
+ /* coverity[buffer_size] */
strncpy(&tmp[cs], "<", len);
cs += len;