[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4666 - in Extractor/src: main plugins
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4666 - in Extractor/src: main plugins |
Date: |
Sun, 11 Mar 2007 18:07:44 -0600 (MDT) |
Author: grothoff
Date: 2007-03-11 18:07:43 -0600 (Sun, 11 Mar 2007)
New Revision: 4666
Modified:
Extractor/src/main/extractor.c
Extractor/src/plugins/mpegextractor.c
Extractor/src/plugins/tarextractor.c
Log:
release
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2007-03-12 00:01:03 UTC (rev 4665)
+++ Extractor/src/main/extractor.c 2007-03-12 00:07:43 UTC (rev 4666)
@@ -1093,7 +1093,8 @@
#endif
#if HAVE_LIBBZ2
- if ( (data[0] == 'B') &&
+ if ( (size >= 4) &&
+ (data[0] == 'B') &&
(data[1] == 'Z') &&
(data[2] == 'h') ) {
/* now try bz2 decompression */
Modified: Extractor/src/plugins/mpegextractor.c
===================================================================
--- Extractor/src/plugins/mpegextractor.c 2007-03-12 00:01:03 UTC (rev
4665)
+++ Extractor/src/plugins/mpegextractor.c 2007-03-12 00:07:43 UTC (rev
4666)
@@ -47,10 +47,11 @@
mpeg2_state_t state;
char format[256];
- if ( ! ( (data[0]==0x00) &&
- (data[1]==0x00) &&
- (data[2]==0x01) &&
- ( (data[3]==0xB3) || (data[3]==0xBA) ) ) )
+ if ( ( size < 4) ||
+ ( ! ( (data[0]==0x00) &&
+ (data[1]==0x00) &&
+ (data[2]==0x01) &&
+ ( (data[3]==0xB3) || (data[3]==0xBA) ) ) ) )
return prev;
handle = mpeg2_init();
Modified: Extractor/src/plugins/tarextractor.c
===================================================================
--- Extractor/src/plugins/tarextractor.c 2007-03-12 00:01:03 UTC (rev
4665)
+++ Extractor/src/plugins/tarextractor.c 2007-03-12 00:07:43 UTC (rev
4666)
@@ -801,11 +801,12 @@
}
}
- if(0 < format_length) {
+ if (0 < format_length) {
strcpy(format + format_length, " TAR");
prev = addKeyword(EXTRACTOR_FORMAT, format, prev);
- }
- free(format);
+ } else {
+ free(format);
+ }
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4666 - in Extractor/src: main plugins,
gnunet <=