mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-25 11:07:35 +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))
|
if (g_utf8_validate(str, size, NULL))
|
||||||
return g_strdup(str);
|
return g_strndup(str, size);
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < sizeof(encodings) / sizeof(gchar *); ++i)
|
for (i = 0; i < sizeof(encodings) / sizeof(gchar *); ++i)
|
||||||
|
|
Loading…
Reference in a new issue