This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12836] fmemopen(buf,size,"w+b") isn't binary
- From: "eblake at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 2 Jun 2011 15:13:28 +0000
- Subject: [Bug libc/12836] fmemopen(buf,size,"w+b") isn't binary
- Auto-submitted: auto-generated
- References: <bug-12836-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12836
--- Comment #1 from Eric Blake <eblake at redhat dot com> 2011-06-02 15:13:26 UTC ---
diff --git i/libio/fmemopen.c w/libio/fmemopen.c
index 75f9f7e..ca7c604 100644
--- i/libio/fmemopen.c
+++ w/libio/fmemopen.c
@@ -251,7 +251,7 @@ fmemopen (void *buf, size_t len, const char *mode)
else
c->pos = 0;
- c->binmode = mode[0] != '\0' && mode[1] == 'b';
+ c->binmode = mode[0] && mode[1 + (mode[1] == '+')] == 'b';
iof.read = fmemopen_read;
iof.write = fmemopen_write;
--
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.