diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-26 20:25:24 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-26 20:50:17 +0000 |
| commit | aab9a0a0cb3f75d37bd81588c65d4232def1c8d5 (patch) | |
| tree | 5c3aca66bfb33b337453770ba77c4357cd97c868 /lib/yang_translator.c | |
| parent | 5c84f23817a00fe3d46d275def673d01ad93b191 (diff) | |
lib: strncpy -> strlcpy | memcpy
strncpy is a byte copy function not a string copy function
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/yang_translator.c')
| -rw-r--r-- | lib/yang_translator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yang_translator.c b/lib/yang_translator.c index 6d6f92836f..76a6cc5fd1 100644 --- a/lib/yang_translator.c +++ b/lib/yang_translator.c @@ -511,7 +511,7 @@ static void str_replace(char *o_string, const char *s_string, if (!ch) return; - strncpy(buffer, o_string, ch - o_string); + memcpy(buffer, o_string, ch - o_string); buffer[ch - o_string] = 0; sprintf(buffer + (ch - o_string), "%s%s", r_string, |
