[tracker/tracker-0.8] Fixes GB#620362, mp3 extraction crashes if year string is NULL before using atoi() with libenca enab



commit e525565c901b69d38df11fabdfb46a00dc84f08c
Author: Martyn Russell <martyn lanedo com>
Date:   Thu Jun 24 09:08:16 2010 +0100

    Fixes GB#620362, mp3 extraction crashes if year string is NULL before using atoi() with libenca enabled
    
    This was first reported to Red Hat's Bugzilla (#596764)

 src/tracker-extract/tracker-extract-mp3.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 4c25585..5fbd641 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -743,7 +743,7 @@ get_id3 (const gchar *data,
 
 	pos += 30;
 	year = g_convert (pos, 4, "UTF-8", encoding, NULL, NULL, NULL);
-	if (atoi (year) > 0) {
+	if (year && atoi (year) > 0) {
 		id3->recording_time = tracker_date_guess (year);
 	}
 	g_free (year);



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