[gnome-color-manager] Fix an invalid read in the pnp tables parsing code
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Fix an invalid read in the pnp tables parsing code
- Date: Wed, 18 Nov 2009 13:44:09 +0000 (UTC)
commit efdabee195d15ef58e8d97f3f9a675d1e332383c
Author: Richard Hughes <richard hughsie com>
Date: Wed Nov 18 13:32:42 2009 +0000
Fix an invalid read in the pnp tables parsing code
src/gcm-tables.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-tables.c b/src/gcm-tables.c
index 0e4e940..e73c750 100644
--- a/src/gcm-tables.c
+++ b/src/gcm-tables.c
@@ -98,6 +98,8 @@ gcm_tables_get_pnp_id (GcmTables *tables, const gchar *pnp_id, GError **error)
/* parse into lines */
split = g_strsplit (data, "\n", -1);
for (i=0; split[i] != NULL; i++) {
+ if (split[i][0] == '\0')
+ continue;
split[i][3] = '\0';
g_hash_table_insert (priv->pnp_table, g_strdup (split[i]), g_strdup (&split[i][4]));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]