Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at utc-mktime.c:10

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

utc_mktime

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/utc-mktime.c)expand/collapse
Show more  
 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);
expand/collapse

tm_cmp

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/utc-mktime.c)expand/collapse
Show more  
 6  static int tm_cmp(const struct tm *tm1, const struct tm *tm2)
 7  {
 8          int diff;
 9   
 10          if ((diff = tm1->tm_year - tm2->tm_year) != 0)
Show more  
Show more  




Change Warning 7144.24455 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: