plugin-scanner: Measure string length in bytes

g_strndup() wants a number of bytes to copy, so use strlen intead of
UTF-8 strlen function.
This commit is contained in:
Nicolas Dufresne 2017-12-01 13:33:48 -05:00
parent bbafb78b1e
commit 4bb5da9c28

View file

@ -708,7 +708,7 @@ extract_symname (const char *filename)
if (dot)
len = dot - bname - prefix_len;
else
len = g_utf8_strlen (bname + prefix_len, -1);
len = strlen (bname + prefix_len);
name = g_strndup (bname + prefix_len, len);
g_free (bname);