[OpenAFS-devel] Re: [OpenAFS] vos: failed to parse date...

Jim Rees rees@umich.edu
Fri, 31 Mar 2006 09:27:01 -0500


I still don't see why the code is so complicated.  Can you think of any
reason not to use a single scanf like I did for the 8601 method?

  A form with seconds will be rejected, but may also scribble on the stack,
  depending on what c points to.

'c' is a local string of length two so I don't see how you could get
scribbling.

  This lacks sufficient validation; specifically, it doesn't include a dummy
  field to tell if there was extra garbage at the end of the input.

I didn't think that was necessary, but until it parses timezone info it's
probably better to check for unexpected input.