This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] [BZ #12836] Make fmemopen(buf,size,"w+b") binary.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Mon, 3 Jun 2013 10:40:46 -0700 (PDT)
- Subject: Re: [PATCH v4] [BZ #12836] Make fmemopen(buf,size,"w+b") binary.
- References: <20130509161648 dot GA31713 at domone dot kolej dot mff dot cuni dot cz> <Pine dot LNX dot 4 dot 64 dot 1305091636200 dot 25142 at digraph dot polyomino dot org dot uk> <20130514115947 dot GA7284 at domone dot kolej dot mff dot cuni dot cz> <20130520082527 dot GB32195 at domone dot kolej dot mff dot cuni dot cz> <20130523190913 dot 04DBA2C09E at topped-with-meat dot com> <20130524091603 dot GA10400 at domone dot kolej dot mff dot cuni dot cz> <20130529223249 dot 84F612C07E at topped-with-meat dot com> <20130601125917 dot GB4086 at domone dot kolej dot mff dot cuni dot cz>
> On closer look sizeof here is off by one error.
What I told you to use is "sizeof s - 1".