(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-enip.c) |
| |
| 460 | | | classify_packet(packet_info *pinfo) |
| 461 | | | { |
| 462 | | | |
| 463 | | | |
| 464 | | | if ( ( ENIP_ENCAP_PORT == pinfo->srcport && ENIP_ENCAP_PORT != pinfo->destport ) || |
| 465 | | | ( ENIP_ENCAP_PORT != pinfo->srcport && ENIP_ENCAP_PORT == pinfo->destport ) ) { |
| 466 | | | if ( ENIP_ENCAP_PORT == pinfo->srcport ) |
| 467 | | | return RESPONSE_PACKET; |
| 468 | | | else if ( ENIP_ENCAP_PORT == pinfo->destport ) |
Redundant Condition
44818 == pinfo->destport always evaluates to true. This may be because: - There is a constant assignment to one or more of the variables involved.
- An earlier conditional statement has already ensured that 44818 == pinfo->destport cannot be false.
- A crashing bug occurs on every path where 44818 == pinfo->destport could have evaluated to false. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 469 | | | return REQUEST_PACKET; |
| 470 | | | } |
| 471 | | | |
| 472 | | | return CANNOT_CLASSIFY; |
| 473 | | | } |
| |