[Win64] Improve the computation of random seed from stack address.
This commit is contained in:
parent
fecb7a60fa
commit
0729bc9f52
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2009-09-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
[Win64] Improve the computation of random seed from stack address.
|
||||
|
||||
On LLP64 platform, the conversion from pointer to FT_Fixed need
|
||||
to drop higher 32-bit. Explict casts are required. Reported by
|
||||
NightStrike from MinGW-w64 project. See
|
||||
http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
|
||||
|
||||
* src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly.
|
||||
|
||||
* src/psaux/t1decode.c: Ditto.
|
||||
|
||||
|
||||
2009-09-03 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[raster] Improvements for stand-alone mode.
|
||||
|
@ -878,9 +878,10 @@
|
||||
decoder->read_width = 1;
|
||||
|
||||
/* compute random seed from stack address of parameter */
|
||||
seed = (FT_Fixed)(char*)&seed ^
|
||||
(FT_Fixed)(char*)&decoder ^
|
||||
(FT_Fixed)(char*)&charstring_base;
|
||||
seed = (FT_Fixed)( ( (FT_PtrDist)(char*)&seed ^
|
||||
(FT_PtrDist)(char*)&decoder ^
|
||||
(FT_PtrDist)(char*)&charstring_base ) &
|
||||
FT_ULONG_MAX ) ;
|
||||
seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;
|
||||
if ( seed == 0 )
|
||||
seed = 0x7384;
|
||||
|
@ -376,9 +376,10 @@
|
||||
|
||||
|
||||
/* compute random seed from stack address of parameter */
|
||||
seed = (FT_Fixed)(char*)&seed ^
|
||||
(FT_Fixed)(char*)&decoder ^
|
||||
(FT_Fixed)(char*)&charstring_base;
|
||||
seed = (FT_Fixed)( ( (FT_PtrDist)(char*)&seed ^
|
||||
(FT_PtrDist)(char*)&decoder ^
|
||||
(FT_PtrDist)(char*)&charstring_base ) &
|
||||
FT_ULONG_MAX ) ;
|
||||
seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;
|
||||
if ( seed == 0 )
|
||||
seed = 0x7384;
|
||||
|
Loading…
Reference in New Issue
Block a user