sound-juicer r2502 - in trunk: . libjuicer
- From: rburton svn gnome org
- To: svn-commits-list gnome org
- Subject: sound-juicer r2502 - in trunk: . libjuicer
- Date: Mon, 6 Apr 2009 07:41:55 +0000 (UTC)
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]