Null Pointer Dereference at utc-mktime.c:10 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
utc_mktime (/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/utc-mktime.c)![]() | |||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||
23 | time_t utc_mktime(const struct tm *tm) | ||||||||||||||||||||||||||||||||||||||||||||||||
24 | { | ||||||||||||||||||||||||||||||||||||||||||||||||
25 | const struct tm *try_tm; | ||||||||||||||||||||||||||||||||||||||||||||||||
26 | time_t t; | ||||||||||||||||||||||||||||||||||||||||||||||||
27 | int bits, dir; | ||||||||||||||||||||||||||||||||||||||||||||||||
28 | |||||||||||||||||||||||||||||||||||||||||||||||||
29 | /* we'll do a binary search across the entire valid time_t range. | ||||||||||||||||||||||||||||||||||||||||||||||||
30 | when gmtime()'s output matches the tm parameter, we've found the | ||||||||||||||||||||||||||||||||||||||||||||||||
31 | correct time_t value. this also means that if tm contains invalid | ||||||||||||||||||||||||||||||||||||||||||||||||
32 | values, -1 is returned. */ | ||||||||||||||||||||||||||||||||||||||||||||||||
33 | #ifdef TIME_T_SIGNED | ||||||||||||||||||||||||||||||||||||||||||||||||
34 | t = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||
35 | #else | ||||||||||||||||||||||||||||||||||||||||||||||||
36 | t = 1 << (TIME_T_MAX_BITS - 1); | ||||||||||||||||||||||||||||||||||||||||||||||||
37 | #endif | ||||||||||||||||||||||||||||||||||||||||||||||||
38 | for (bits = TIME_T_MAX_BITS - 2;; bits--) { | ||||||||||||||||||||||||||||||||||||||||||||||||
39 | try_tm = gmtime(&t); | ||||||||||||||||||||||||||||||||||||||||||||||||
40 | [+] | dir = tm_cmp(tm, try_tm); | |||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() |