From owner-freebsd-bugs Fri Oct 27 10:17:04 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA05734 for bugs-outgoing; Fri, 27 Oct 1995 10:17:04 -0700 Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id KAA05728 for ; Fri, 27 Oct 1995 10:17:02 -0700 Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM) id AA23164; Fri, 27 Oct 1995 13:16:48 -0400 Date: Fri, 27 Oct 1995 13:16:48 -0400 From: "Garrett A. Wollman" Message-Id: <9510271716.AA23164@halloran-eldar.lcs.mit.edu> To: kedron@tribe.com (Kedron Wolcott) Cc: bugs@freebsd.org Subject: 2.0.5 mktemp bug. In-Reply-To: <199510271707.KAA08844@tribe.com> References: <199510271707.KAA08844@tribe.com> Sender: owner-bugs@freebsd.org Precedence: bulk < However, I do think this is a bug. The program > --------- > #include > void > main ( void ) > { > mktemp( "/tmp/tmp.XXXX" ); > } > --------- Your program is wrong. String literals are not modifiable. The correct code is as follows: int /* NB: not void */ main(void) { char name[] = "/tmp/tmp.XXXX"; mktemp(name); /* NB: using modifiable array, not a literal */ return 0; } -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant