mailing list of musl libc
 help / color / mirror / code / Atom feed
* Possible oversight in setvbuf()
@ 2018-07-13 14:40 Markus Wichmann
  2018-07-13 21:31 ` Rich Felker
  2018-07-14  2:05 ` Rich Felker
  0 siblings, 2 replies; 7+ messages in thread
From: Markus Wichmann @ 2018-07-13 14:40 UTC (permalink / raw)
  To: musl

Hi all,

ungetc() seems to depend on f->buf pointing UNGET bytes into a valid
array. fdopen() will provide such a thing. However, setvbuf() will set
f->buf to the very start of the user provided buffer. Bizarrely, UNGET
is deducted from the buffer size, but not added to the pointer.
Oversight or intentional?

Ciao,
Markus


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-14  2:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 14:40 Possible oversight in setvbuf() Markus Wichmann
2018-07-13 21:31 ` Rich Felker
2018-07-13 21:46   ` Christopher Friedt
2018-07-13 22:06     ` Rich Felker
2018-07-13 22:19       ` Christopher Friedt
2018-07-14  2:03         ` Rich Felker
2018-07-14  2:05 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).