This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17343] Signed integer overflow in /stdlib/random_r.c


https://sourceware.org/bugzilla/show_bug.cgi?id=17343

--- Comment #4 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, release/2.26/master has been updated
       via  02f0dd83a4abf190f13eef8d70811a7c8ec896ad (commit)
      from  3241353ab20b4cc8798088d456ffa9aace1514de (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=02f0dd83a4abf190f13eef8d70811a7c8ec896ad

commit 02f0dd83a4abf190f13eef8d70811a7c8ec896ad
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu May 17 14:04:58 2018 +0200

    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.

    (cherry picked from commit 8a07b0c43c46a480da070efd53a2720195e2256f)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    6 ++++++
 NEWS              |    1 +
 stdlib/random_r.c |    9 ++++-----
 3 files changed, 11 insertions(+), 5 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]