public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "per.mathisen at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/12527] New: Off by one bug with ftell() with fmemopen() Date: Tue, 01 Mar 2011 19:59:00 -0000 [thread overview] Message-ID: <bug-12527-131@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=12527 Summary: Off by one bug with ftell() with fmemopen() Product: glibc Version: 2.12 Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: drepper.fsp@gmail.com ReportedBy: per.mathisen@gmail.com Created attachment 5269 --> http://sourceware.org/bugzilla/attachment.cgi?id=5269 Program that fails The attached tiny program assert fails on ftell(fp) == ftell(fp), which it seems to me should always work. I only get this problem with file pointers created with fmemopen and the "r+" mode, and only with sequences of events similar to those in the attached file. The ftell() seems to always returns 1 less than the actual size when it fails. There also seems to be an issue with fmemopen() when used with the "r+" mode if the input buffer is not zero cleared. See comment in attachment. -- 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.
next reply other threads:[~2011-03-01 19:59 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-01 19:59 per.mathisen at gmail dot com [this message] 2011-03-01 20:09 ` [Bug libc/12527] " per.mathisen at gmail dot com 2011-03-01 20:12 ` per.mathisen at gmail dot com 2011-03-03 11:58 ` schwab@linux-m68k.org 2011-03-03 20:17 ` dflahert at us dot ibm.com 2011-03-03 21:28 ` per.mathisen at gmail dot com 2011-03-06 4:13 ` drepper.fsp at gmail dot com 2011-03-07 21:04 ` per.mathisen at gmail dot com 2011-03-12 21:46 ` per.mathisen at gmail dot com 2011-05-12 3:45 ` drepper.fsp at gmail dot com 2014-06-27 13:48 ` fweimer at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-12527-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).