diff options
author | Christopher Ferris <cferris@google.com> | 2024-07-15 20:26:19 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2024-07-19 08:36:55 (GMT) |
commit | 914812a9bf76bc57e9c7bad54f1f6c4c99e8d1ca (patch) | |
tree | 22a3c14af022d848b2648fc2b27e1930a1e0be66 /tools | |
parent | 5248e1a45576617b349465997822cef34cbc5053 (diff) | |
download | libnl-914812a9bf76bc57e9c7bad54f1f6c4c99e8d1ca.zip libnl-914812a9bf76bc57e9c7bad54f1f6c4c99e8d1ca.tar.gz libnl-914812a9bf76bc57e9c7bad54f1f6c4c99e8d1ca.tar.bz2 |
lib: avoid overflow in computation of s_seq_next
On some systems, the clock is reset, or is lost, so the value returned
by the time function can be a very small value. In that case, the
_badrandom_from_time function returns a large value close to the
maximum unsigned int value for s_seq_next. This can lead to the value
wrapping around fairly quickly.
When compiling the library with the unsigned-integer-overflow sanitizer
enabled, this causes an abort.
Detect this potential wrap around condition and avoid it.
https://github.com/thom311/libnl/pull/395
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions