channels: fix possible overflow in logging
Fixes clang compiler warning: "warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size]" strncat requires an extra byte for '\0' so dest needs to have a size of n+1
This commit is contained in:
parent
d37af95e70
commit
3e355c9f79
@ -28,8 +28,8 @@
|
||||
wLogMessage msg; \
|
||||
wLog *log; \
|
||||
\
|
||||
strncat(tag, "com.freerdp.channels.", sizeof(tag)); \
|
||||
strncat(tag, dbg_str, sizeof(tag) - sizeof("com.freerdp.channels.")); \
|
||||
strncat(tag, "com.freerdp.channels.", sizeof(tag) - 1); \
|
||||
strncat(tag, dbg_str, sizeof(tag) - 1 - sizeof("com.freerdp.channels.")); \
|
||||
log = WLog_Get(tag); \
|
||||
\
|
||||
msg.Type = WLOG_MESSAGE_TEXT; \
|
||||
|
Loading…
Reference in New Issue
Block a user