[tracker/tracker-0.6] Added some extra checks for size in mp3 extraction.
- From: Mikael Ottela <mottela src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-0.6] Added some extra checks for size in mp3 extraction.
- Date: Thu, 7 May 2009 11:01:00 -0400 (EDT)
commit b6a9079cf7ada74e739dbef476df688fda49d88b
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Thu May 7 17:57:30 2009 +0300
Added some extra checks for size in mp3 extraction.
---
src/tracker-extract/tracker-extract-mp3.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 4f15f2c..8a20bdb 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -303,10 +303,13 @@ read_id3v1_buffer (int fd, goffset size)
guint bytes_read;
guint rc;
- if (lseek (fd, size-ID3V1_SIZE, SEEK_SET) < 0) {
+ if (size<128) {
return NULL;
}
+ if (lseek (fd, size-ID3V1_SIZE, SEEK_SET) < 0) {
+ return NULL;
+ }
buffer = g_malloc (ID3V1_SIZE);
@@ -454,6 +457,10 @@ get_id3 (const gchar *data,
const gchar *pos;
gchar buf[5];
+ if (!data) {
+ return FALSE;
+ }
+
if (size < 128) {
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]