The smb dce_opnum matches all the opnums that are higher that the
indicated opnum. This is due the range comparison if was put in the
exact comparison context, and in case the opnum doesn't match exactly,
then the range comparison is triggered (the upper limit is always true).
Move the erroneus if to the outer context, as else option of the block
checks if comparison should be exact or range.
Ticket: 4767
if range.range2 == DETECT_DCE_OPNUM_RANGE_UNINITIALIZED {
if range.range1 == x.opnum as u32 {
return 1;
- } else if range.range1 <= x.opnum as u32 && range.range2 >= x.opnum as u32 {
- return 1;
}
+ } else if range.range1 <= x.opnum as u32 && range.range2 >= x.opnum as u32 {
+ return 1;
}
}
}