This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13152] New: fmemopen does not honor append mode


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

             Bug #: 13152
           Summary: fmemopen does not honor append mode
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: bugdal@aerifal.cx
    Classification: Unclassified


fmemopen sets the initial offset correctly for append mode, but otherwise seems
to treat append mode just like "r+" (read/update) mode. Writes are not forced
to start at the "current size" of the stream, as specified by POSIX:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html

In other words, opening a stream for append, then seeking to the beginning and
attempting a write overwrites the beginning of the buffer rather than
appending.

-- 
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]