This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/22347] New: getrandom() returns the number of bytes that were copied to the buffer even though the comments say "Return 0 on success and -1 on failure."
- From: "eero+sourceware at vuojolahti dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 24 Oct 2017 20:22:50 +0000
- Subject: [Bug libc/22347] New: getrandom() returns the number of bytes that were copied to the buffer even though the comments say "Return 0 on success and -1 on failure."
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22347
Bug ID: 22347
Summary: getrandom() returns the number of bytes that were
copied to the buffer even though the comments say
"Return 0 on success and -1 on failure."
Product: glibc
Version: 2.26
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: eero+sourceware at vuojolahti dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
This is the current comment on line 25 sysdeps/unix/sysv/linux/getrandom.c:
/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
success and -1 on failure. */
It could be changed to:
/* Write LENGTH bytes of randomness starting at BUFFER. Return number of
bytes that were copied to the BUFFER on success and -1 on failure. */
--
You are receiving this mail because:
You are on the CC list for the bug.