diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-05-18 10:44:51 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-05-18 10:44:51 +0100 |
commit | 39518eb3c1c2e5eb1ba287f65aeb24c35cdc6d4b (patch) | |
tree | 1abc417d040ffdea69de841bfd730fe18b278c66 /utils | |
parent | 966ed9449cc6cb84aaacc07d87bb88283804f062 (diff) | |
download | netsurf-39518eb3c1c2e5eb1ba287f65aeb24c35cdc6d4b.tar.gz netsurf-39518eb3c1c2e5eb1ba287f65aeb24c35cdc6d4b.tar.bz2 |
fix possible buffer termination error (coverity 1195410)
Diffstat (limited to 'utils')
-rw-r--r-- | utils/utf8.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/utf8.c b/utils/utf8.c index a6282dbba..a8e3e5de8 100644 --- a/utils/utf8.c +++ b/utils/utf8.c @@ -237,8 +237,8 @@ utf8_convert(const char *string, iconv_close(last_cd.cd); /* and copy the to/from/cd data into last_cd */ - strncpy(last_cd.from, from, sizeof(last_cd.from)); - strncpy(last_cd.to, to, sizeof(last_cd.to)); + snprintf(last_cd.from, sizeof(last_cd.from), "%s", from); + snprintf(last_cd.to, sizeof(last_cd.to), "%s", to); last_cd.cd = cd; } |