diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-03-19 20:53:04 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-03-19 19:54:39 +0000 |
commit | c14cc2f4edf8f88ce4bd64f8e6dff1dcccb07a14 (patch) | |
tree | 87431ab1056496e8a1f2677a1ca07fff7b6d3ebe | |
parent | 0f51f78608c90d00a6f4cda599b1df26bad4b8d5 (diff) |
Make checkAPIs happy
strncpy -> g_strlcpy
Change-Id: Ib17b6799a762e2e2e65bf7c6dd5a894bfb127c86
Reviewed-on: https://code.wireshark.org/review/746
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r-- | wiretap/logcat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/logcat.c b/wiretap/logcat.c index 5d661ac3e1..5d905219c7 100644 --- a/wiretap/logcat.c +++ b/wiretap/logcat.c @@ -413,7 +413,7 @@ static gboolean logcat_dump_text(wtap_dumper *wdh, str_begin = str_end = log; while (dumper->type != DUMP_LONG && (str_end = strchr(str_begin, '\n'))) { log_part = (gchar *) g_malloc(str_end - str_begin + 1); - strncpy(log_part, str_begin, str_end - str_begin); + g_strlcpy(log_part, str_begin, str_end - str_begin); log_part[str_end - str_begin] = '\0'; str_begin = str_end + 1; @@ -438,7 +438,7 @@ static gboolean logcat_dump_text(wtap_dumper *wdh, if (*str_begin != '\0') { log_part = (gchar *) g_malloc(strlen(str_begin) + 1); - strncpy(log_part, str_begin, strlen(str_begin)); + g_strlcpy(log_part, str_begin, strlen(str_begin)); log_part[strlen(str_begin)] = '\0'; buf = logcat_log(dumper, *datetime, *nanoseconds / 1000000, *pid, *tid, |