1
0
Fork 0

Adding upstream version 1.18~pre2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-21 11:25:51 +01:00
parent cf6c2d1d59
commit ed1b0d872f
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
18 changed files with 427 additions and 220 deletions

View file

@ -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;