Merge pull request #193 from derfian/mppc-undefined-behavior
Clean up undefined behavior in complicated and/or/shift expression
This commit is contained in:
commit
45d625b20e
6
mppc.c
6
mppc.c
@ -349,9 +349,9 @@ mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen
|
||||
}
|
||||
|
||||
match_bits = match_len;
|
||||
match_len =
|
||||
((walker >> (32 - match_bits)) & (~(-1 << match_bits))) | (1 <<
|
||||
match_bits);
|
||||
match_len = (walker >> (32 - match_bits));
|
||||
match_len &= ((1 << match_bits) - 1);
|
||||
match_len |= (1 << match_bits);
|
||||
walker <<= match_bits;
|
||||
walker_len -= match_bits;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user