| To: | yyyyyyyyyyyyyyy@xxxxxxxxxxxxx |
|---|---|
| Subject: | Defect in XSH mktemp |
| From: | yyyy@xxxxxxx |
| Date: | Fri, 26 May 2006 22:52:37 +0100 (BST) |
Defect report from : Eric Blake , N/A
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 777 line 25506 section mktemp editorial {ebb9.mktemp}
Problem:
Edition of Specification (Year): 2004
Defect code : 1. Error
The EXAMPLES for mktemp can cause undefined behavior, since it is initializing
a char* with a string constant that can live in read-only memory, but mktemp
has to modify its argument.
Action:
If mktemp is not removed altogether (after all, it is marked LEGACY), the fix
is to replace line 25506
char *template = "/tmp/fileXXXXXX";
with
char template[] = "/tmp/fileXXXXXX";
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Defect in XSH posix_trace_create, mstrbill |
|---|---|
| Next by Date: | Defect in XSH readdir, eggert |
| Previous by Thread: | Defect in XSH posix_trace_create, mstrbill |
| Next by Thread: | Defect in XSH readdir, eggert |
| Indexes: | [Date] [Thread] [All Lists] |