diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2018-08-14 18:52:30 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2018-08-14 18:53:17 +0100 |
commit | b63264c8342e6a1b6971c79550d2af2024b6a4de (patch) | |
tree | 83114aac64286fe616506c0b3dfaec2ab86ef835 /lib/librte_cmdline/cmdline_parse_string.c | |
parent | ca33590b6af032bff57d9cc70455660466a654b2 (diff) |
New upstream version 18.08upstream/18.08
Change-Id: I32fdf5e5016556d9c0a6d88ddaf1fc468961790a
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_cmdline/cmdline_parse_string.c')
-rw-r--r-- | lib/librte_cmdline/cmdline_parse_string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librte_cmdline/cmdline_parse_string.c b/lib/librte_cmdline/cmdline_parse_string.c index abde0412..9cf41d0f 100644 --- a/lib/librte_cmdline/cmdline_parse_string.c +++ b/lib/librte_cmdline/cmdline_parse_string.c @@ -125,10 +125,10 @@ cmdline_parse_string(cmdline_parse_token_hdr_t *tk, const char *buf, void *res, if (res) { if ((sd->str != NULL) && (strcmp(sd->str, TOKEN_STRING_MULTI) == 0)) /* we are sure that token_len is < STR_MULTI_TOKEN_SIZE-1 */ - snprintf(res, STR_MULTI_TOKEN_SIZE, "%s", buf); + strlcpy(res, buf, STR_MULTI_TOKEN_SIZE); else /* we are sure that token_len is < STR_TOKEN_SIZE-1 */ - snprintf(res, STR_TOKEN_SIZE, "%s", buf); + strlcpy(res, buf, STR_TOKEN_SIZE); *((char *)res + token_len) = 0; } |