[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug Report from a cookie tester volunteer



   I have never done any open source work so I don't know what to do other
   than report this bug.

   Should I try to update on my local version and complete the testing?
   Then send the code snippets back to you?

   The bug I am reporting is in the cookie2ts procedure of
   LIBHTTP/QRPGLESRC(HEADERR4)

   The cookie timestamp = VALUE = 'MON, 12 DEC 2016 14:22:19 GMT'

   bug reported: When STATE = 1 (day of month parse) and the trailing
   blank is processed the logic iterates without changing STATE = 2. The
   iteration sets the value of CH to the first character of the day of
   month which is then processed as STATE = 1 which finally sets STATE =
   2. The problem is we loose the first character of the Day of month.

   This same scenario is presented for STATE = 2 processing on the
   trailing blank after month.

    My suggested fixes are:

   *******************************************
   * State 1: Reading the "day of month"
   * (2-digit number)
   *******************************************
   c when state = 1

   c if ch = ' ' and day = *blanks
   c iter
   c endif

   C NUMBERS check ch Found
   c if found = 0
   c eval day = day + ch
   c else
   c eval state = 2
   c endif

   *******************************************
   * State 2: Reading the month name
   * (3-char abbreviation)
   *******************************************
   c when state = 2

   c if ch = ' ' and mon = *blanks
   c iter
   c endif

   C UPPER check ch Found
   c if found = 0
   c eval mon = mon + ch
   c else
   c eval state = 3
   c endif

   How shall I proceed from here???
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------