Adding upstream version 1.18~pre2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
cf6c2d1d59
commit
ed1b0d872f
18 changed files with 427 additions and 220 deletions
|
@ -41,10 +41,9 @@ bool gross_damage( const long long msize, const uint8_t * const mbuffer )
|
|||
enum { maxlen = 6 }; // max number of consecutive identical bytes
|
||||
long i = File_header::size;
|
||||
const long end = msize - File_trailer::size - maxlen;
|
||||
uint8_t byte;
|
||||
while( i < end )
|
||||
{
|
||||
byte = mbuffer[i];
|
||||
const uint8_t byte = mbuffer[i];
|
||||
int len = 0; // does not count the first byte
|
||||
while( mbuffer[++i] == byte && ++len < maxlen ) {}
|
||||
if( len >= maxlen ) return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue