(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ansi_683.c) |
| |
| 1493 | | | for_param_block_val_spc(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) |
| 1494 | | | { |
| 1495 | | | guint32 saved_offset; |
| 1496 | | | guint32 value; |
| 1497 | | | |
| 1498 | | | EXACT_DATA_CHECK(len, 3);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ansi_683.c |
| |
119 | #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \ |
120 | if ((edc_len) != (edc_eq_len)) \ |
121 | { \ |
122 | proto_tree_add_none_format(tree, hf_ansi_683_none, tvb, \ |
123 | offset, (edc_len), "Unexpected Data Length"); \ |
124 | return; \ |
125 | } |
| |
|
| 1499 | | | |
| 1500 | | | saved_offset = offset; |
| 1501 | | | |
| 1502 | | | value = tvb_get_guint8(tvb, offset++); |
| 1503 | | | bigbuf[0] = bcd_digits[(value & 0x0f)]; |
| 1504 | | | bigbuf[1] = bcd_digits[(value & 0xf0) >> 4]; |
| 1505 | | | |
| 1506 | | | value = tvb_get_guint8(tvb, offset++); |
| 1507 | | | bigbuf[2] = bcd_digits[(value & 0x0f)]; |
| 1508 | | | bigbuf[3] = bcd_digits[(value & 0xf0) >> 4]; |
| 1509 | | | |
| 1510 | | | value = tvb_get_guint8(tvb, offset++); |
Unused Value
The value assigned to offset is never subsequently used on any execution path. |
|
| 1511 | | | bigbuf[4] = bcd_digits[(value & 0x0f)]; |
| 1512 | | | bigbuf[5] = bcd_digits[(value & 0xf0) >> 4]; |
| 1513 | | | bigbuf[6] = '\0'; |
| 1514 | | | |
| 1515 | | | proto_tree_add_none_format(tree, hf_ansi_683_none, |
| 1516 | | | tvb, saved_offset, len, |
| 1517 | | | "Service programming code: %s", |
| 1518 | | | bigbuf); |
| 1519 | | | } |
| |