This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17343] Signed integer overflow in /stdlib/random_r.c
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 20 Mar 2018 18:26:17 +0000
- Subject: [Bug libc/17343] Signed integer overflow in /stdlib/random_r.c
- Auto-submitted: auto-generated
- References: <bug-17343-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17343
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 8a07b0c43c46a480da070efd53a2720195e2256f (commit)
from ceb54b9b4ff5ef7d518a6e6e415a6897fb77eb67 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8a07b0c43c46a480da070efd53a2720195e2256f
commit 8a07b0c43c46a480da070efd53a2720195e2256f
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Mar 20 18:25:24 2018 +0000
Fix signed integer overflow in random_r (bug 17343).
Bug 17343 reports that stdlib/random_r.c has code with undefined
behavior because of signed integer overflow on int32_t. This patch
changes the code so that the possibly overflowing computations use
unsigned arithmetic instead.
Note that the bug report refers to "Most code" in that file. The
places changed in this patch are the only ones I found where I think
such overflow can occur.
Tested for x86_64 and x86.
[BZ #17343]
* stdlib/random_r.c (__random_r): Use unsigned arithmetic for
possibly overflowing computations.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
stdlib/random_r.c | 9 ++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.