diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2020-06-24 03:09:53 +0300 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2020-06-24 16:29:19 +0300 |
commit | 09e12a826f3e9960b2f9a8aaa9098109587e27f7 (patch) | |
tree | 4e1a2ee9440020d1c6bd42f817a1e50ead6207ce /src/config/tlscerts.h | |
parent | 5d8f3f27916e5b9efc9fce6401f83f533f8a80a8 (diff) | |
download | profani-tty-09e12a826f3e9960b2f9a8aaa9098109587e27f7.tar.gz |
Fix gcc warnings for cygwin
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.
Diffstat (limited to 'src/config/tlscerts.h')
0 files changed, 0 insertions, 0 deletions