Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Data Flow  at imap-date.c:94

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

imap_mktime

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-date.c)expand/collapse
Show more  
 82  static bool imap_mktime(struct tm *tm, time_t *time_r)
 83  {
 84          *time_r = utc_mktime(tm);
 85          if (*time_r != (time_t)-1)
 86                  return TRUE;
 87   
 88          /* the date is outside valid range for time_t. it might still be
 89             technically valid though, so try to handle this case.
 90             with 64bit time_t the full 0..9999 year range is valid. */
 91          if (tm->tm_year <= 100) {
 92                  /* too old. time_t can be signed or unsigned, handle 
 93                     both cases. */
 94                  *time_r = (time_t)-1 < (int)0 ? INT_MIN : 0;
 95          } else {
 96                  /* too high. return the highest allowed value.
 97                     we shouldn't get here with 64bit time_t,
 98                     but handle that anyway. */
 99  #if (TIME_T_MAX_BITS == 32 || TIME_T_MAX_BITS == 64)
 100                  *time_r = (1UL << (TIME_T_MAX_BITS-1)) - 1;
 101  #else
 102                  *time_r = (1UL << TIME_T_MAX_BITS) - 1;
 103  #endif
 104          }
 105          return FALSE;
 106  }
Show more  




Change Warning 7173.24493 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: