cvs commit: src/lib/libc/stdio mktemp.c
John Baldwin
jhb at FreeBSD.org
Mon Jul 28 21:19:17 UTC 2008
jhb 2008-07-28 21:18:59 UTC
FreeBSD src repository
Modified files:
lib/libc/stdio mktemp.c
Log:
SVN rev 180938 on 2008-07-28 21:18:59Z by jhb
Fix a few bugs with the _gettemp() routine which implements mkstemp(),
mkstemps(), and mkdtemp().
- Add proper range checking for the 'slen' parameter passed to mkstemps().
- Try all possible permutations of a template if a collision is encountered.
Previously, once a single template character reached 'z', it would not wrap
around to '0' and keep going until it encountered the original starting
letter. In the edge case that the randomly generated starting name used
all 'z' characters, only that single name would be tried before giving up.
PR: standards/66531
Submitted by: Jim Luther
Obtained from: Apple
MFC after: 1 week
Revision Changes Path
1.31 +26 -11 src/lib/libc/stdio/mktemp.c
More information about the cvs-src
mailing list