public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/13908] New: mktemp() incorrectly flagged with __wur in stdlib.h
@ 2012-03-27 23:00 dvw at phas dot ubc.ca
  2012-04-05  8:58 ` [Bug libc/13908] " aj at suse dot de
  2014-06-26 13:41 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: dvw at phas dot ubc.ca @ 2012-03-27 23:00 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13908

             Bug #: 13908
           Summary: mktemp() incorrectly flagged with __wur in stdlib.h
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: dvw@phas.ubc.ca
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


stdlib.h contains:

/* Generate a unique temporary file name from TEMPLATE.
   The last six characters of TEMPLATE must be "XXXXXX";
   they are replaced with a string that makes the file name unique.
   Returns TEMPLATE, or a null pointer if it cannot get a unique file name.  */
extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur;



The documentation here is incorrect: mktemp() always returns TEMPLATE, and sets
template[0] to 0 on failure, as required by POSIX.

Consequently, this declaration should not be marked with __wur.  The caller
gains no information by inspecting the return value of mktemp().  (Instead, it
should be checking template[0] to detect failure.)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/13908] mktemp() incorrectly flagged with __wur in stdlib.h
  2012-03-27 23:00 [Bug libc/13908] New: mktemp() incorrectly flagged with __wur in stdlib.h dvw at phas dot ubc.ca
@ 2012-04-05  8:58 ` aj at suse dot de
  2014-06-26 13:41 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: aj at suse dot de @ 2012-04-05  8:58 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13908

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |aj at suse dot de
         Resolution|                            |FIXED
         AssignedTo|unassigned at sourceware    |aj at suse dot de
                   |dot org                     |
   Target Milestone|---                         |2.16

--- Comment #1 from Andreas Jaeger <aj at suse dot de> 2012-04-05 08:57:40 UTC ---
Thanks, fixed in glibc head for glibc 2.16

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/13908] mktemp() incorrectly flagged with __wur in stdlib.h
  2012-03-27 23:00 [Bug libc/13908] New: mktemp() incorrectly flagged with __wur in stdlib.h dvw at phas dot ubc.ca
  2012-04-05  8:58 ` [Bug libc/13908] " aj at suse dot de
@ 2014-06-26 13:41 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-26 13:41 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13908

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-26 13:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 23:00 [Bug libc/13908] New: mktemp() incorrectly flagged with __wur in stdlib.h dvw at phas dot ubc.ca
2012-04-05  8:58 ` [Bug libc/13908] " aj at suse dot de
2014-06-26 13:41 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).