mirror of
https://github.com/profanity-im/profanity.git
synced 2024-06-16 21:35:24 +00:00
09e12a826f
strncpy(3) is not so safe function and can lead to mistakes. For example, strncpy(dest, "Profanity", 10); is redundant and leads to problems when someone changes the source string. Different example is when 3rd argument equals to length of the destination buffer. strncpy(3) doesn't terminate string with '\0' when it truncates. Therefore, the destination string becomes corrupted. Zeroize storage for 'nid', so the last byte remains '\0' in case of truncate. |
||
---|---|---|
.. | ||
command | ||
config | ||
event | ||
omemo | ||
otr | ||
pgp | ||
plugins | ||
tools | ||
ui | ||
xmpp | ||
common.c | ||
common.h | ||
database.c | ||
database.h | ||
log.c | ||
log.h | ||
main.c | ||
profanity.c | ||
profanity.h |