tracker r2738 - in trunk: . src/libtracker-data
- From: mottela svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2738 - in trunk: . src/libtracker-data
- Date: Mon, 22 Dec 2008 16:19:35 +0000 (UTC)
Author: mottela
Date: Mon Dec 22 16:19:35 2008
New Revision: 2738
URL: http://svn.gnome.org/viewvc/tracker?rev=2738&view=rev
Log:
Added escaping to metadata strings for SQL
Modified:
trunk/ChangeLog
trunk/src/libtracker-data/tracker-data-update.c
Modified: trunk/src/libtracker-data/tracker-data-update.c
==============================================================================
--- trunk/src/libtracker-data/tracker-data-update.c (original)
+++ trunk/src/libtracker-data/tracker-data-update.c Mon Dec 22 16:19:35 2008
@@ -438,11 +438,15 @@
metadata_key = tracker_ontology_service_get_key_metadata (tracker_service_get_name (service),
tracker_field_get_name (field));
if (metadata_key > 0) {
+ gchar *escaped_value;
+
+ escaped_value = tracker_escape_string (value);
tracker_db_interface_execute_query (iface, NULL,
"update Services set KeyMetadata%d = '%s' where id = %d",
metadata_key,
- value,
+ escaped_value,
service_id);
+ g_free (escaped_value);
}
g_free (id_str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]