mirror of https://github.com/FreeRDP/FreeRDP
client/x11: Silence false positive warnings from covscan
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]".
This commit is contained in:
parent
baeb29a7e0
commit
e7d5aae514
|
@ -52,8 +52,10 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
|
|||
}
|
||||
|
||||
if (format)
|
||||
/* coverity[buffer_size] */
|
||||
strncpy(&tmp[cs], "<replaceable>", len);
|
||||
else
|
||||
/* coverity[buffer_size] */
|
||||
strncpy(&tmp[cs], "<", len);
|
||||
|
||||
cs += len;
|
||||
|
@ -71,8 +73,10 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
|
|||
}
|
||||
|
||||
if (format)
|
||||
/* coverity[buffer_size] */
|
||||
strncpy(&tmp[cs], "</replaceable>", len);
|
||||
else
|
||||
/* coverity[buffer_size] */
|
||||
strncpy(&tmp[cs], "<", len);
|
||||
|
||||
cs += len;
|
||||
|
|
Loading…
Reference in New Issue