[tracker] Fixes GB#620362, mp3 extraction crashes if year string is NULL before using atoi() with libenca enab
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Fixes GB#620362, mp3 extraction crashes if year string is NULL before using atoi() with libenca enab
- Date: Thu, 24 Jun 2010 08:08:41 +0000 (UTC)
commit f49a0e1f944c6ab0514d665ba2e6f66e96039c0d
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 09d9663..6f5ce94 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -777,7 +777,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]