[tracker] tracker-extract: Don't read the last two bytes if trackn. is there



commit 122f46c2f6262d8ca4247157c24c5f9f20557b88
Author: Philip Van Hoof <philip codeminded be>
Date:   Fri Mar 4 13:38:33 2011 +0100

    tracker-extract: Don't read the last two bytes if trackn. is there

 src/tracker-extract/tracker-extract-mp3.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index d24aee1..1269fbf 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -743,7 +743,7 @@ get_id3 (const gchar *data,
 		s = g_string_new_len (pos, 30);
 		g_string_append_len (s, pos + 30, 30);
 		g_string_append_len (s, pos + 60, 30);
-		g_string_append_len (s, pos + 90, 30);
+		g_string_append_len (s, pos + 90, (pos[28] != 0) ? 30 : 28);
 		g_string_append_len (s, pos + 120, 30);
 
 		encoding = get_encoding (s->str, 90, &encoding_was_found);



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