Submitter: David Keaton (suggested by Jens Gustedt)
Submission Date: 2014-03-13


The ctime_s function in Annex K was defined analogously to ctime, and some of the text from the definition of ctime was copied and modified slightly.

K. states that ctime_s is equivalent to the following.

asctime_s(s, maxsize, localtime_s(timer))

In this case, the text from the original ctime definition was not quite modified enough.  The localtime_s function takes two arguments and the above code only supplies one.

Suggested Technical Corrigendum

In K., replace

asctime_s(s, maxsize, localtime_s(timer))

with the following.

asctime_s(s, maxsize, localtime_s(timer, &(struct tm){ 0 }))