[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."
eero+sourceware at vuojolahti dot com
sourceware-bugzilla@sourceware.org
Tue Oct 24 20:22:00 GMT 2017
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.
More information about the Glibc-bugs
mailing list