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



commit 733f6b90f5104db275d653cf2cc5281d0d79f253
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]