*BSD News Article 22820


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!uunet!Germany.EU.net!mcsun!ieunet!news.ieunet.ie!jkh
From: jkh@whisker.lotus.ie (Jordan K. Hubbard)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: mktemp() crashes
Date: 25 Oct 93 23:45:22
Organization: Lotus Development Ireland
Lines: 25
Distribution: world
Message-ID: <JKH.93Oct25234522@whisker.lotus.ie>
References: <CF7snJ.ID9@dvorak.amd.com> <1993Oct21.093717.2658@zen.void.oz.au>
	<1993Oct21.120854.2900@zen.void.oz.au>
NNTP-Posting-Host: whisker.lotus.ie
In-reply-to: sjg@zen.void.oz.au's message of Thu, 21 Oct 1993 12:08:54 GMT

In article <1993Oct21.120854.2900@zen.void.oz.au> sjg@zen.void.oz.au (Simon J. Gerraty) writes:

   >Solutions:
   >2/	fix mktemp() to use a private static array.

   Here is a patch to implement option 2.

   Fix:
	   The following patch modifes mktemp() to use a private (static)
	   buffer which it can safely modify.  


BLETCH!!  That's no fix at all!  Please don't apply it, anyone.
Repeated calls to mktemp() will not DTRT, not to mention the fact that
this fixes a "problem" that doesn't exist!  You don't write on string
constants - no no no, plain and simple!  No need to whap on poor
mktemp(), who's only doing the job it's supposed to do.

				Jordan

--
(Jordan K. Hubbard)  jkh@violet.berkeley.edu, jkh@al.org, jkh@whisker.lotus.ie

I do not speak for Lotus, nor am I even a Lotus employee.  I am an independent
contractor.