(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dec-dnart.c) |
| |
| 344 | | | static char * |
| 345 | | | dnet_ntoa(const guint8 *data) |
| 346 | | | { |
| 347 | | | if (data[0] == 0xAA && data[1] == 0x00 && data[2] == 0x04 && data[3] == 0x00) { |
Redundant Condition
data[3] == 0 always evaluates to false. 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 data[3] == 0 cannot be true.
- A crashing bug occurs on every path where data[3] == 0 could have evaluated to true. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 348 | | | guint16 dnet_addr = data[4] | (data[5] << 8); |
| 349 | | | return ep_strdup_printf("%d.%d", dnet_addr >> 10, dnet_addr & 0x03FF); |
| 350 | | | } |
| 351 | | | return NULL; |
| 352 | | | } |
| |