diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c
index f9ba222..e8a6923 100644
--- a/gst-libs/gst/tag/id3v2frames.c
+++ b/gst-libs/gst/tag/id3v2frames.c
@@ -695,11 +695,19 @@ parse_obsolete_tdat_frame (ID3TagsWorking * work)
       g_ascii_isdigit (work->parse_data[2]) &&
       g_ascii_isdigit (work->parse_data[3]) &&
       g_ascii_isdigit (work->parse_data[4])) {
-    work->pending_day = (10 * g_ascii_digit_value (work->parse_data[1])) +
+
+    guint pending_day = (10 * g_ascii_digit_value (work->parse_data[1])) +
         g_ascii_digit_value (work->parse_data[2]);
-    work->pending_month = (10 * g_ascii_digit_value (work->parse_data[3])) +
+    guint pending_month = (10 * g_ascii_digit_value (work->parse_data[3])) +
         g_ascii_digit_value (work->parse_data[4]);
-    GST_LOG ("date (dd/mm) %02u/%02u", work->pending_day, work->pending_month);
+
+    if(pending_day >= 1 && pending_day <= 31 && pending_month >= 1 && pending_month <= 12) {
+      GST_LOG ("date (dd/mm) %02u/%02u", pending_day, pending_month);
+      work->pending_day = pending_day;
+      work->pending_month = pending_month;
+    } else {
+      GST_WARNING ("Ignoring invalid ID3v2 TDAT frame (dd/mm) %02u/%02u", pending_day, pending_month);
+    }
   }
 }

