This is the mail archive of the libc-alpha@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]

Re: Fix signed integer overflow in random_r (bug 17343)


On 03/20/2018 10:54 AM, Joseph Myers wrote:
        *result = (val >> 1) & 0x7fffffff;

One other thing I just noticed: now that val is uint32_t, the above should be simplifed to "*result = val >> 1;". The patch looks good otherwise; thanks.


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