tracker r3014 - in trunk: . src/tracker-extract
- From: mottela svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r3014 - in trunk: . src/tracker-extract
- Date: Tue, 3 Mar 2009 19:37:36 +0000 (UTC)
Author: mottela
Date: Tue Mar 3 19:37:35 2009
New Revision: 3014
URL: http://svn.gnome.org/viewvc/tracker?rev=3014&view=rev
Log:
Fixed frame size calculation
Modified:
trunk/ChangeLog
trunk/src/tracker-extract/tracker-escape.c
trunk/src/tracker-extract/tracker-extract-mp3.c
Modified: trunk/src/tracker-extract/tracker-escape.c
==============================================================================
--- trunk/src/tracker-extract/tracker-escape.c (original)
+++ trunk/src/tracker-extract/tracker-escape.c Tue Mar 3 19:37:35 2009
@@ -33,8 +33,6 @@
{
const gchar *end;
- g_debug ("string:%s", str);
-
if (g_utf8_validate (str, -1, &end)) {
return g_strstrip (g_strdup (str));
}
Modified: trunk/src/tracker-extract/tracker-extract-mp3.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-mp3.c (original)
+++ trunk/src/tracker-extract/tracker-extract-mp3.c Tue Mar 3 19:37:35 2009
@@ -722,7 +722,8 @@
break;
}
- flags = (data[pos + 8] << 8) + data[pos + 9];
+ flags = ( ((unsigned char)(data[pos + 8]) << 8) +
+ ((unsigned char)(data[pos + 9]) ) );
if (((flags & 0x80) > 0) ||
((flags & 0x40) > 0)) {
pos += 10 + csize;
@@ -971,15 +972,15 @@
padding = 0;
if (extendedHdr) {
- ehdrSize = (((data[10]) << 24) |
- ((data[11]) << 16) |
- ((data[12]) << 8) |
- ((data[12]) << 0));
-
- padding = (((data[15]) << 24) |
- ((data[16]) << 16) |
- ((data[17]) << 8) |
- ((data[18]) << 0));
+ ehdrSize = (((unsigned char)(data[10]) << 24) |
+ ((unsigned char)(data[11]) << 16) |
+ ((unsigned char)(data[12]) << 8) |
+ ((unsigned char)(data[12]) << 0));
+
+ padding = (((unsigned char)(data[15]) << 24) |
+ ((unsigned char)(data[16]) << 16) |
+ ((unsigned char)(data[17]) << 8) |
+ ((unsigned char)(data[18]) << 0));
pos += 4 + ehdrSize;
@@ -1001,10 +1002,10 @@
return;
}
- csize = (data[pos + 4] << 24) +
- (data[pos + 5] << 16) +
- (data[pos + 6] << 8) +
- data[pos + 7];
+ csize = (((unsigned char)(data[pos + 4]) << 24) |
+ ((unsigned char)(data[pos + 5]) << 16) |
+ ((unsigned char)(data[pos + 6]) << 8) |
+ ((unsigned char)(data[pos + 7]) << 0) );
if ((pos + 10 + csize > tsize) ||
(csize > tsize) ||
@@ -1012,7 +1013,8 @@
break;
}
- flags = (data[pos + 8] << 8) + data[pos + 9];
+ flags = ( ((unsigned char)(data[pos + 8]) << 8) +
+ ((unsigned char)(data[pos + 9])) );
if (((flags & 0x80) > 0) || ((flags & 0x40) > 0)) {
pos += 10 + csize;
@@ -1250,7 +1252,9 @@
return;
}
- csize = (data[pos+3] << 16) + (data[pos + 4] << 8) + data[pos + 5];
+ csize = (((unsigned char)(data[pos + 3]) << 16) +
+ ((unsigned char)(data[pos + 4]) << 8) +
+ ((unsigned char)(data[pos + 5]) ) );
if ((pos + 6 + csize > tsize) ||
(csize > tsize) ||
(csize == 0)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]