mirror of
https://github.com/apache/nuttx.git
synced 2026-10-05 21:27:49 +00:00
* libs/libc/misc/lib_getrandom.c, in function getrandom(): We were assigning the return value of _NX_READ() to nbytes, a variable of the unsigned type size_t. Note that _NX_READ() resolves to either read() or nx_read(), both of which return the signed type ssize_t to indicate either the number of bytes read successfully (>= 0) or an error (< 0). Then we were testing for a negative size_t value, a condition that can never occur. The end result is that if an error occured in _NX_READ(), it would never be detected and getrandom() would return some large positive value. This bug is corrected by assigning the return value of _NX_READ() to a new local variable, ret, of size ssize_t. |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| lib_crc8.c | ||
| lib_crc8ccitt.c | ||
| lib_crc8table.c | ||
| lib_crc16.c | ||
| lib_crc32.c | ||
| lib_crc64.c | ||
| lib_cxx_initialize.c | ||
| lib_debug.c | ||
| lib_dumpbuffer.c | ||
| lib_dumpvbuffer.c | ||
| lib_envpath.c | ||
| lib_err.c | ||
| lib_execinfo.c | ||
| lib_fnmatch.c | ||
| lib_ftok.c | ||
| lib_getrandom.c | ||
| lib_glob.c | ||
| lib_impure.c | ||
| lib_kbddecode.c | ||
| lib_kbdencode.c | ||
| lib_mkfifo.c | ||
| lib_mknod.c | ||
| lib_ncompress.c | ||
| lib_slcddecode.c | ||
| lib_slcdencode.c | ||
| lib_tea_decrypt.c | ||
| lib_tea_encrypt.c | ||
| lib_uadd32x64.c | ||
| lib_uadd64.c | ||
| lib_umask.c | ||
| lib_umul32.c | ||
| lib_umul32x64.c | ||
| lib_umul64.c | ||
| lib_usub64.c | ||
| lib_usub64x32.c | ||
| lib_utsname.c | ||
| lib_xorshift128.c | ||
| Make.defs | ||