1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Update: Avoid more complicate process if in_charset is the same as out_charset

This commit is contained in:
Philipp Schafft 2022-02-25 14:30:54 +00:00
parent 79bc367769
commit b986bf5d78

View File

@ -1458,6 +1458,12 @@ char *util_conv_string (const char *string, const char *in_charset, const char *
if (string == NULL || in_charset == NULL || out_charset == NULL)
return NULL;
if (strcmp(in_charset, out_charset) == 0) {
ret = strdup(string);
if (ret)
return ret;
}
in = xmlFindCharEncodingHandler (in_charset);
out = xmlFindCharEncodingHandler (out_charset);