(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-vnc.c) |
| |
| 1301 | | | vnc_client_set_encodings(tvbuff_t *tvb, packet_info *pinfo, gint *offset, |
| 1302 | | | proto_tree *tree) |
| 1303 | | | { |
| 1304 | | | guint16 number_of_encodings; |
| 1305 | | | guint counter; |
| 1306 | | | vnc_packet_t *per_packet_info; |
| 1307 | | | |
| 1308 | [+] | | per_packet_info = p_get_proto_data(pinfo->fd, proto_vnc); |
 |
| 1309 | | | |
| 1310 | [+] | | if (check_col(pinfo->cinfo, COL_INFO)) |
 |
| 1311 | | | col_set_str(pinfo->cinfo, COL_INFO, "Client set encodings"); |
| 1312 | | | |
| 1313 | | | proto_tree_add_item(tree, hf_vnc_padding, |
| 1314 | | | tvb, *offset, 1, FALSE); |
| 1315 | | | *offset += 1; |
| 1316 | | | |
| 1317 | | | number_of_encodings = tvb_get_ntohs(tvb, *offset); |
| 1318 | | | |
| 1319 | | | proto_tree_add_text(tree, tvb, *offset, 2, |
| 1320 | | | "Number of encodings: %d", number_of_encodings); |
| 1321 | | | *offset += 2; |
| 1322 | | | |
| 1323 | | | per_packet_info->preferred_encoding = -1; |
Null Pointer Dereference
per_packet_info is dereferenced here, but it is NULL. The issue can occur if the highlighted code executes. See related event 4. Show: All events | Only primary events |
|
| |