diff options
author | Sam James <sam@gentoo.org> | 2024-12-10 01:21:46 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2025-01-02 16:47:51 +0000 |
commit | d5bceac99d24af1131b90027dab267e437b65cd1 (patch) | |
tree | 6fb637f76ac3a727c3050af608c9701134075fc6 /sysdeps/unix/sysv/linux/glibcsyscalls.py | |
parent | 6f0ea84f17581d13ad668adbc181c37141d389b8 (diff) | |
download | glibc-d5bceac99d24af1131b90027dab267e437b65cd1.zip glibc-d5bceac99d24af1131b90027dab267e437b65cd1.tar.gz glibc-d5bceac99d24af1131b90027dab267e437b65cd1.tar.bz2 |
stdlib: random_r: fix unaligned access in initstate and initstate_r [BZ #30584]
The initstate{,_r} interfaces are documented in BSD as needing an aligned
array of 32-bit values, but neither POSIX nor glibc's own documentation
require it to be aligned. glibc's documentation says it "should" be a power
of 2, but not must.
Use memcpy to read and write to `state` to handle such an unaligned
argument.
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/glibcsyscalls.py')
0 files changed, 0 insertions, 0 deletions