[tracker/tracker-0.6] Fixes NB#126696, Tracker extractor crashes while extracting a corrupted music
- From: Mikael Ottela <mottela src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-0.6] Fixes NB#126696, Tracker extractor crashes while extracting a corrupted music
- Date: Tue, 7 Jul 2009 12:41:39 +0000 (UTC)
commit 3f9bdf04718567e9941e70857271307c6f5493bf
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Tue Jul 7 12:09:14 2009 +0300
Fixes NB#126696, Tracker extractor crashes while extracting a corrupted music
file
Added checks for the size of an extended header for the mp3 extractor.
src/tracker-extract/tracker-extract-mp3.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 7dcde3b..26f0fd8 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -1707,6 +1707,10 @@ parse_id3v24 (const gchar *data,
((data[12] & 0x7F) << 7) |
((data[13] & 0x7F) << 0));
pos += ehdrSize;
+
+ if (tsize + 10 + ehdrSize > size) {
+ return;
+ }
}
if (unsync) {
@@ -1776,6 +1780,10 @@ parse_id3v23 (const gchar *data,
pos += 4 + ehdrSize;
+ if (tsize + 10 + ehdrSize + padding > size) {
+ return;
+ }
+
if (padding < tsize) {
tsize -= padding;
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]