Commit 5209d673 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-extract: Guarantee that titles are UTF-8

The tracker_guarantee_resource_title_from_file() function may
possibly accept non-utf8 from extractors. While the file display
name fallbacks are utf8 safe, the given string should be checked.
parent 6c6a3a63
Pipeline #32612 passed with stage
in 2 minutes and 23 seconds
......@@ -109,7 +109,7 @@ tracker_guarantee_resource_title_from_file (TrackerResource *resource,
g_return_val_if_fail (uri != NULL, FALSE);
if (current_value && *current_value != '\0') {
tracker_resource_set_string (resource, key, current_value);
tracker_guarantee_resource_utf8_string (resource, key, current_value);
if (p_new_value != NULL) {
*p_new_value = g_strdup (current_value);
......@@ -133,7 +133,7 @@ tracker_guarantee_resource_title_from_file (TrackerResource *resource,
}
#else /* GUARANTEE_METADATA */
if (current_value && *current_value != '\0') {
tracker_resource_set_string (resource, key, current_value);
tracker_guarantee_resource_utf8_string (resource, key, current_value);
if (p_new_value != NULL) {
*p_new_value = g_strdup (current_value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment