(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-smb-pipe.c) |
| |
| 522 | | | add_abstime_common(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_index, |
| 523 | | | const char *absent_name) |
| 524 | | | { |
| 525 | | | nstime_t nstime; |
| 526 | | | struct tm *tmp; |
| 527 | | | |
| 528 | [+] | | nstime.secs = tvb_get_letohl(tvb, offset); |
 |
| 529 | | | nstime.nsecs = 0; |
| 530 | | | |
| 531 | | | |
| 532 | | | |
| 533 | | | |
| 534 | | | |
| 535 | | | if (nstime.secs == -1 || nstime.secs == 0) { |
Event 1:
Taking false branch. - nstime.secs == -1 evaluates to false.
- nstime.secs == 0 evaluates to false.
hide
|
|
| 536 | | | proto_tree_add_time_format(tree, hf_index, tvb, offset, 4, |
| 537 | | | &nstime, "%s: %s", proto_registrar_get_name(hf_index), |
| 538 | | | absent_name); |
| 539 | | | } else { |
| 540 | | | |
| 541 | | | |
| 542 | | | |
| 543 | | | |
| 544 | | | |
| 545 | | | tmp = gmtime(&nstime.secs); |
Event 2:
gmtime() returns NULL. - Dereferenced later, causing the null pointer dereference.
hide
Event 3:
tmp is set to gmtime(&nstime.secs), which evaluates to NULL. See related event 2.
hide
|
|
| 546 | | | tmp->tm_isdst = -1; |
Null Pointer Dereference
tmp is dereferenced here, but it is NULL. The issue can occur if the highlighted code executes. See related event 3. Show: All events | Only primary events |
|
| |