CID 712424: Unintended sign extension.

Fix taken from glibc, glibc bug #3747.
This commit is contained in:
Alex Smith 2012-08-18 13:52:10 +01:00
parent 3ab9de3b68
commit d339b8398c

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1997, 1998, 2001 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1997, 1998, 2001, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@ -30,7 +30,7 @@ __jrand48_r (xsubi, buffer, result)
return -1;
/* Store the result. */
*result = ((xsubi[2] << 16) | xsubi[1]) & 0xffffffffl;
*result = (int32_t) ((xsubi[2] << 16) | xsubi[1]);
return 0;
}