[tracker/tracker-0.8] libtracker-extract (tracker_date_guess): Protect against invalid values.



commit cbc92db381e8ab224729b652f23e9dab121d2589
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue May 4 15:37:12 2010 +0200

    libtracker-extract (tracker_date_guess): Protect against invalid values.

 src/libtracker-extract/tracker-utils.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-utils.c b/src/libtracker-extract/tracker-utils.c
index 91b2196..146a651 100644
--- a/src/libtracker-extract/tracker-utils.c
+++ b/src/libtracker-extract/tracker-utils.c
@@ -525,6 +525,10 @@ tracker_date_guess (const gchar *date_string)
 
 		num_month = parse_month (date_string + 4);
 
+		if (num_month < 0) {
+			return NULL;
+		}
+
 		mon1 = imonths[num_month];
 
 		if (date_string[8] == ' ') {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]