Diff for /embedaddon/sudo/plugins/sudoers/getdate.y between versions 1.1.1.1 and 1.1.1.3

version 1.1.1.1, 2012/02/21 16:23:02 version 1.1.1.3, 2013/10/14 07:56:34
Line 375  static TABLE const OtherTable[] = { Line 375  static TABLE const OtherTable[] = {
     { "today",          tMINUTE_UNIT,   0 },      { "today",          tMINUTE_UNIT,   0 },
     { "now",            tMINUTE_UNIT,   0 },      { "now",            tMINUTE_UNIT,   0 },
     { "last",           tUNUMBER,       -1 },      { "last",           tUNUMBER,       -1 },
    { "this",           tMINUTE_UNIT,       0 },    { "this",           tUNUMBER,       0 },
     { "next",           tUNUMBER,       2 },      { "next",           tUNUMBER,       2 },
     { "first",          tUNUMBER,       1 },      { "first",          tUNUMBER,       1 },
 /*  { "second",         tUNUMBER,       2 }, */  /*  { "second",         tUNUMBER,       2 }, */
Line 586  Convert(Month, Day, Year, Hours, Minutes, Seconds, Mer Line 586  Convert(Month, Day, Year, Hours, Minutes, Seconds, Mer
     }      }
     DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0)      DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0)
                     ? 29 : 28;                      ? 29 : 28;
    /* Checking for 2038 bogusly assumes that time_t is 32 bits.  But    /* 32-bit time_t cannot represent years past 2038 */
       I'm too lazy to try to check for time_t overflow in another way.  */    if (Year < EPOCH || (sizeof(time_t) == sizeof(int) && Year > 2038)
    if (Year < EPOCH || Year > 2038 
      || Month < 1 || Month > 12       || Month < 1 || Month > 12
      /* Lint fluff:  "conversion from long may lose accuracy" */       /* Lint fluff:  "conversion from long may lose accuracy" */
      || Day < 1 || Day > DaysInMonth[(int)--Month])       || Day < 1 || Day > DaysInMonth[(int)--Month])

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>