mailing list of musl libc
 help / color / mirror / code / Atom feed
* getdents* bug
@ 2019-06-27  9:54 Florian Weimer
  2019-06-27 12:49 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2019-06-27  9:54 UTC (permalink / raw)
  To: musl

The kernel only accepts buffer size values up to INT_MAX.  I agree that
size_t is the correct type for the buffer size, but it means that
userspace needs to clamp large values to INT_MAX.

Thanks,
Florian


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

* Re: getdents* bug
  2019-06-27  9:54 getdents* bug Florian Weimer
@ 2019-06-27 12:49 ` Rich Felker
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2019-06-27 12:49 UTC (permalink / raw)
  To: musl

On Thu, Jun 27, 2019 at 11:54:02AM +0200, Florian Weimer wrote:
> The kernel only accepts buffer size values up to INT_MAX.  I agree that
> size_t is the correct type for the buffer size, but it means that
> userspace needs to clamp large values to INT_MAX.

Thanks! I forgot that we even had an exposed version of that syscall.

Rich


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

end of thread, other threads:[~2019-06-27 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27  9:54 getdents* bug Florian Weimer
2019-06-27 12:49 ` 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).