diff options
author | Simon Rettberg | 2021-03-22 14:28:11 +0100 |
---|---|---|
committer | Simon Rettberg | 2021-03-22 14:28:11 +0100 |
commit | f559a3bed428fb2dce5a23e7c04aecf45c99a39e (patch) | |
tree | 836bc698f11b5059f00918363d126d3ca28a0866 /src | |
parent | [BUILD] Fix build issue if version information (Git tag) is missing (diff) | |
download | dnbd3-f559a3bed428fb2dce5a23e7c04aecf45c99a39e.tar.gz dnbd3-f559a3bed428fb2dce5a23e7c04aecf45c99a39e.tar.xz dnbd3-f559a3bed428fb2dce5a23e7c04aecf45c99a39e.zip |
[SERVER] Fix compiler warning
Diffstat (limited to 'src')
-rw-r--r-- | src/server/ini.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/ini.c b/src/server/ini.c index c796d5c..37c44a3 100644 --- a/src/server/ini.c +++ b/src/server/ini.c @@ -52,7 +52,7 @@ static char* find_char_or_comment(const char* s, char c) /* Version of strncpy that ensures dest (size bytes) is null-terminated. */ static char* strncpy0(char* dest, const char* src, size_t size) { - strncpy( dest, src, size ); + strncpy( dest, src, size - 1 ); dest[size - 1] = '\0'; return dest; } |