@@ -702,16 +702,13 @@ pub unsafe fn BZ2_decompress(strm: &mut bz_stream, s: &mut DState) -> ReturnCode
702
702
GET_UCHAR ! ( strm, s, uc) ;
703
703
704
704
s. origPtr = s. origPtr << 8 | uc as i32 ;
705
- if s . origPtr < 0 {
705
+ if ! ( 0 .. 10 + 100000 * s . blockSize100k ) . contains ( & s . origPtr ) {
706
706
retVal = ReturnCode :: BZ_DATA_ERROR ;
707
707
break ' save_state_and_return;
708
- } else if s. origPtr > 10 + 100000 * s. blockSize100k {
709
- retVal = ReturnCode :: BZ_DATA_ERROR ;
710
- break ' save_state_and_return;
711
- } else {
712
- i = 0 ;
713
- current_block = 454873545234741267 ;
714
708
}
709
+
710
+ i = 0 ;
711
+ current_block = 454873545234741267 ;
715
712
}
716
713
717
714
// mutable because they need to be reborrowed
@@ -829,7 +826,7 @@ pub unsafe fn BZ2_decompress(strm: &mut bz_stream, s: &mut DState) -> ReturnCode
829
826
830
827
GET_BITS ! ( strm, s, nGroups, 3 ) ;
831
828
832
- if !! ( 2 ..=6 ) . contains ( & nGroups) {
829
+ if ( 2 ..=6 ) . contains ( & nGroups) {
833
830
current_block = 14590825336193814119 ;
834
831
continue ;
835
832
}
@@ -1373,7 +1370,7 @@ pub unsafe fn BZ2_decompress(strm: &mut bz_stream, s: &mut DState) -> ReturnCode
1373
1370
current_block = 7746242308555130918 ;
1374
1371
continue ;
1375
1372
}
1376
- if !! ( 1 ..=20 ) . contains ( & curr) {
1373
+ if ( 1 ..=20 ) . contains ( & curr) {
1377
1374
current_block = 17216244326479313607 ;
1378
1375
continue ' c_10064;
1379
1376
}
0 commit comments