[tracker-miners/tracker-miners-2.1] libtracker-extract: Guarantee that titles are UTF-8
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/tracker-miners-2.1] libtracker-extract: Guarantee that titles are UTF-8
- Date: Wed, 26 Sep 2018 15:55:02 +0000 (UTC)
commit 2c6041ee1f5edcc9656b5983abd03e47598b1110
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Sep 26 15:45:49 2018 +0200
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.
src/libtracker-extract/tracker-guarantee.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-guarantee.c b/src/libtracker-extract/tracker-guarantee.c
index 63202f435..e544a0552 100644
--- a/src/libtracker-extract/tracker-guarantee.c
+++ b/src/libtracker-extract/tracker-guarantee.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]