mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-05 23:50:07 +00:00
Fixed strdup without size in convert_utf8
This commit is contained in:
parent
926c8e0b81
commit
dde703c8a9
|
@ -191,7 +191,7 @@ gitg_utils_convert_utf8(gchar const *str, gssize size)
|
|||
};
|
||||
|
||||
if (g_utf8_validate(str, size, NULL))
|
||||
return g_strdup(str);
|
||||
return g_strndup(str, size);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < sizeof(encodings) / sizeof(gchar *); ++i)
|
||||
|
|
Loading…
Reference in a new issue