mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
* stdlib/random_r.c (__setstate_r): Correct offset when computing new rptr and fptr. Reported by Michael Fischer <fischer@cs.yale.edu>. * posix/regex.h: Add macro definitions to allow compiling outside glibc.
This commit is contained in:
@ -295,8 +295,8 @@ __setstate_r (arg_state, buf)
|
||||
if (type != TYPE_0)
|
||||
{
|
||||
int rear = new_state[0] / MAX_TYPES;
|
||||
buf->rptr = &new_state[rear];
|
||||
buf->fptr = &new_state[(rear + separation) % degree];
|
||||
buf->rptr = &new_state[1 + rear];
|
||||
buf->fptr = &new_state[1 + (rear + separation) % degree];
|
||||
}
|
||||
buf->state = &new_state[1];
|
||||
/* Set end_ptr too. */
|
||||
|
Reference in New Issue
Block a user