(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-spoolss.c) |
| |
| 502 | | | dissect_SYSTEM_TIME(tvbuff_t *tvb, int offset, packet_info *pinfo, |
| 503 | | | proto_tree *tree, guint8 *drep, const char *name, |
| 504 | | | gboolean add_subtree, char **data) |
| 505 | | | { |
| 506 | | | proto_item *item = NULL; |
| 507 | | | proto_tree *subtree = tree; |
| 508 | | | guint16 year, month, day, hour, minute, second, millisecond; |
| 509 | | | char *str; |
| 510 | | | |
| 511 | | | if (add_subtree) { |
Event 1:
Skipping " if". add_subtree evaluates to false.
hide
|
|
| 512 | | | item = proto_tree_add_text(tree, tvb, offset, 16, "%s", name); |
| 513 | | | subtree = proto_item_add_subtree(item, ett_SYSTEM_TIME); |
| 514 | | | } |
| 515 | | | |
| 516 | | | offset = dissect_ndr_uint16( |
| 517 | | | tvb, offset, pinfo, subtree, drep, hf_time_year, &year); |
| 518 | | | |
| 519 | | | offset = dissect_ndr_uint16( |
| 520 | | | tvb, offset, pinfo, subtree, drep, hf_time_month, &month); |
| 521 | | | |
| 522 | | | offset = dissect_ndr_uint16( |
| 523 | | | tvb, offset, pinfo, subtree, drep, hf_time_dow, NULL); |
| 524 | | | |
| 525 | | | offset = dissect_ndr_uint16( |
| 526 | | | tvb, offset, pinfo, subtree, drep, hf_time_day, &day); |
| 527 | | | |
| 528 | | | offset = dissect_ndr_uint16( |
| 529 | | | tvb, offset, pinfo, subtree, drep, hf_time_hour, &hour); |
| 530 | | | |
| 531 | | | offset = dissect_ndr_uint16( |
| 532 | | | tvb, offset, pinfo, subtree, drep, hf_time_minute, &minute); |
| 533 | | | |
| 534 | | | offset = dissect_ndr_uint16( |
| 535 | [+] | | tvb, offset, pinfo, subtree, drep, hf_time_second, &second); |
Event 2:
dissect_ndr_uint16() does not initialize second. - This may be because of a failure case or other special case for dissect_ndr_uint16().
hide
|
|
 |
| 536 | | | |
| 537 | | | offset = dissect_ndr_uint16( |
| 538 | | | tvb, offset, pinfo, subtree, drep, hf_time_msec, &millisecond); |
| 539 | | | |
| 540 | | | str = ep_strdup_printf("%d/%02d/%02d %02d:%02d:%02d.%03d", |
| 541 | | | year, month, day, hour, minute, second, |
Uninitialized Variable
second was not initialized. The issue can occur if the highlighted code executes. See related event 2. Show: All events | Only primary events |
|
| 542 | | | millisecond); |
| |