delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/27/15:53:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com, "Tony Richardson" <richardson AT evansville DOT edu>
Subject: Re: mkstemp bug
Mail-Copies-To: never
Reply-To: sds AT gnu DOT org
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
From: Sam Steingold <sds AT gnu DOT org>
In-Reply-To: <d4oilk$onv$1@sea.gmane.org> (Tony Richardson's message of "Wed, 27 Apr 2005 12:41:20 -0500")
References: <usm1cb0aa DOT fsf AT gnu DOT org> <d4oilk$onv$1 AT sea DOT gmane DOT org>
Mail-Followup-To: cygwin AT cygwin DOT com, "Tony Richardson" <richardson AT evansville DOT edu>
Date: Wed, 27 Apr 2005 15:52:21 -0400
Message-ID: <uhdhsatfu.fsf@gnu.org>
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)
MIME-Version: 1.0

> * Tony Richardson <evpuneqfba AT rinafivyyr DOT rqh> [2005-04-27 12:41:20 -0500]:
>
> I'm surprised your example doesn't segfault.  My Linux man page says
> explicitly that the template should not be a string constant but must
> be a character array, i.e. use
>
>     char t1[] = "/tmp/clisp-x-io-XXXXXX";
>     char t2[] = "/tmp/clisp-x-io-XXXXXX";
>     char t3[] = "/tmp/clisp-x-io-XXXXXX";
>
>     mkstemp(t1);
>     mkstemp(t2);
>     mkstemp(t3);
>
> instead.

that's what I did.  I was sloppy in my posting.
the strings passed to mkstemp where explicitly allocated with alloca and
properly filled.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://ffii.org/> <http://www.dhimmi.com/> <http://www.mideasttruth.com/>
<http://www.honestreporting.com> <http://www.memri.org/>
The world is coming to an end.  Please log off.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019