aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tag/TagString.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tag/TagString.cxx b/src/tag/TagString.cxx
index 22fbfc0b8..3a0f0b3f5 100644
--- a/src/tag/TagString.cxx
+++ b/src/tag/TagString.cxx
@@ -39,7 +39,7 @@ patch_utf8(const char *src, size_t length, const gchar *end)
{
/* duplicate the string, and replace invalid bytes in that
buffer */
- char *dest = xstrdup(src);
+ char *dest = xstrndup(src, length);
do {
dest[end - src] = '?';