public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "michael dot kerrisk at gmx dot net" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/1996] open_memstream() and seek past end of buffer
Date: Mon, 24 Apr 2006 23:06:00 -0000	[thread overview]
Message-ID: <20060424230602.29298.qmail@sourceware.org> (raw)
In-Reply-To: <20051208153314.1996.michael.kerrisk@gmx.net>


------- Additional Comments From michael dot kerrisk at gmx dot net  2006-04-24 23:06 -------
Subject: Re:  open_memstream() and seek past end of buffer

Hi Ryan,

> Your call:
> 
> l = fseek(output, 50, SEEK_END);
> 
> is failing with l == -1, but there is no errno being set.  I'm taking a
> look at the fseek() function.  I think it is returning from CHECK_FILE()
> with -1 and no errno.  This is probably because you're trying to seek to
> the end of an empty stream at this point.  I'll investigate more.

I'm not quite sure what you mean by its "my call".  Yes, fseek() is 
failing with errno not set, but the point is that *according to the 
documentation* I should be able to successfully perform move to some point 
past the endd of stream:

     You can move the stream's file position with `fseek' or `fseeko'
     (*note File Positioning::).  Moving the file position past the end
     of the data already written fills the intervening space with
     zeroes.

Cheers,

Michael



-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  parent reply	other threads:[~2006-04-24 23:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08 15:33 [Bug libc/1996] New: " michael dot kerrisk at gmx dot net
2006-04-24 22:05 ` [Bug libc/1996] " rsa at us dot ibm dot com
2006-04-24 23:06 ` michael dot kerrisk at gmx dot net [this message]
2006-04-25 21:22 ` rsa at us dot ibm dot com
2006-08-14 22:16 ` drepper 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=20060424230602.29298.qmail@sourceware.org \
    --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: link
Be 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).