[tracker] libtracker-extract: Ensure UTF-8 content in contact/tag helpers
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-extract: Ensure UTF-8 content in contact/tag helpers
- Date: Sat, 16 Jul 2016 17:22:48 +0000 (UTC)
commit ebfbf4307d06b49b3d016f9e64f700fed700a515
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jul 16 17:23:31 2016 +0200
libtracker-extract: Ensure UTF-8 content in contact/tag helpers
Those are created from untrusted data in some places, better to ensure
UTF-8 content in those.
src/libtracker-extract/tracker-resource-helpers.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-resource-helpers.c
b/src/libtracker-extract/tracker-resource-helpers.c
index 95b92c6..496f31a 100644
--- a/src/libtracker-extract/tracker-resource-helpers.c
+++ b/src/libtracker-extract/tracker-resource-helpers.c
@@ -18,6 +18,7 @@
*/
#include "tracker-resource-helpers.h"
+#include "tracker-guarantee.h"
/**
* SECTION:tracker-resource-helpers
@@ -89,7 +90,7 @@ tracker_extract_new_contact (const char *fullname)
publisher = tracker_resource_new (uri);
tracker_resource_set_uri (publisher, "rdf:type", "nco:Contact");
- tracker_resource_set_string (publisher, "nco:fullname", fullname);
+ tracker_guarantee_resource_utf8_string (publisher, "nco:fullname", fullname);
g_free (uri);
@@ -296,7 +297,7 @@ tracker_extract_new_tag (const char *label)
tag = tracker_resource_new (uri);
tracker_resource_set_uri (tag, "rdf:type", "nao:Tag");
- tracker_resource_set_string (tag, "nao:prefLabel", label);
+ tracker_guarantee_resource_utf8_string (tag, "nao:prefLabel", label);
g_free (uri);
return tag;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]