[PATCH] Avoid near-infinite looping in __gen_tempname

Mike Frysinger vapier at gentoo.org
Mon Apr 30 21:19:33 UTC 2007


On Sunday 22 April 2007, Nickolai Zeldovich wrote:
> The code to create a unique file (mktemp) has a logic error in uClibc.
>  When __gen_tempname picks a file name that already exists, the code
> attempts to retry.  However, the code to pick a new file name is
> outside of this retry loop, causing a retry with the same exact
> filename, which is very likely to fail again.  This patch fixes this
> problem by moving the random filename generation code inside the retry
> loop:
>
>     http://moscow.scs.stanford.edu/~nickolai/uclibc-tempname-patch
>
> (Again apologies for the URL.)

so attach your patch since the URL here is unavailable
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070430/fb5f6620/attachment-0002.pgp 


More information about the uClibc mailing list