(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-synphasor.c) |
| |
| 658 | | | static gint (tvbuff_t *tvb, proto_tree *tree) |
| 659 | | | { |
| 660 | | | proto_tree *temp_tree; |
| 661 | | | proto_item *temp_item; |
| 662 | | | |
| 663 | | | gint offset = 0; |
| 664 | | | guint16 framesize, idcode; |
| 665 | | | |
| 666 | | | |
| 667 | | | temp_item = proto_tree_add_item(tree, hf_sync, tvb, offset, 2, FALSE); |
| 668 | | | temp_tree = proto_item_add_subtree(temp_item, ett_frtype); |
| 669 | | | proto_tree_add_item(temp_tree, hf_sync_frtype, tvb, offset, 2, FALSE); |
| 670 | | | proto_tree_add_item(temp_tree, hf_sync_version, tvb, offset, 2, FALSE); |
| 671 | | | offset += 2; |
| 672 | | | |
| 673 | | | |
| 674 | | | proto_tree_add_item(tree, hf_frsize, tvb, offset, 2, FALSE); |
| 675 | | | framesize = tvb_get_ntohs(tvb, offset); offset += 2; |
| 676 | | | |
| 677 | | | |
| 678 | | | proto_tree_add_item(tree, hf_idcode, tvb, offset, 2, FALSE); |
| 679 | | | idcode = tvb_get_ntohs(tvb, offset); offset += 2; |
| 680 | | | |
| 681 | | | |
| 682 | | | { |
| 683 | | | |
| 684 | | | char buf[20]; |
| 685 | | | struct tm* t; |
| 686 | | | time_t soc = tvb_get_ntohl(tvb, offset); |
| 687 | | | t = gmtime(&soc); |
| 688 | | | strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", t); |
Event 1:
strftime() does not initialize buf. - This may be because of a failure case or other special case for strftime(). Consult the strftime() documentation for more information.
hide
|
|
| 689 | [+] | | proto_tree_add_string(tree, hf_soc, tvb, offset, 4, buf); |
Event 2:
buf is passed to proto_tree_add_string() as the sixth argument.
hide
Event 3:
proto_tree_add_string() does not initialize buf. - This may be because of a failure case or other special case for proto_tree_add_string().
hide
|
|
 |
| |