sound-juicer r2502 - in trunk: . libjuicer



Author: rburton
Date: Mon Apr  6 07:41:55 2009
New Revision: 2502
URL: http://svn.gnome.org/viewvc/sound-juicer?rev=2502&view=rev

Log:
2009-04-06  Ross Burton  <ross linux intel com>

	* libjuicer/sj-metadata.c:
	Check that the date isn't NULL when parsing (#578060).


Modified:
   trunk/ChangeLog
   trunk/libjuicer/sj-metadata.c

Modified: trunk/libjuicer/sj-metadata.c
==============================================================================
--- trunk/libjuicer/sj-metadata.c	(original)
+++ trunk/libjuicer/sj-metadata.c	Mon Apr  6 07:41:55 2009
@@ -152,7 +152,11 @@
 sj_metadata_helper_scan_date (const char *date)
 {
   int matched, year=1, month=1, day=1;
-  matched = sscanf(date, "%u-%u-%u", &year, &month, &day);
+
+  if (date == NULL)
+    return NULL;
+
+  matched = sscanf (date, "%u-%u-%u", &year, &month, &day);
   if (matched >= 1) {
     return g_date_new_dmy ((day == 0) ? 1 : day, (month == 0) ? 1 : month, year);
   }



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