* src/sfnt/sfwoff2.c (compute_ULong_sum): Fix undefined shift.
Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16933
This commit is contained in:
parent
543a3b939d
commit
3fa35aa420
|
@ -1,3 +1,11 @@
|
||||||
|
2019-09-03 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* src/sfnt/sfwoff2.c (compute_ULong_sum): Fix undefined shift.
|
||||||
|
|
||||||
|
Reported as
|
||||||
|
|
||||||
|
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16933
|
||||||
|
|
||||||
2019-09-01 Werner Lemberg <wl@gnu.org>
|
2019-09-01 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* src/sfnt/sfwoff2.c (woff2_open_font): Add sanity check.
|
* src/sfnt/sfwoff2.c (woff2_open_font): Add sanity check.
|
||||||
|
|
|
@ -292,10 +292,10 @@
|
||||||
|
|
||||||
|
|
||||||
for ( i = 0; i < aligned_size; i += 4 )
|
for ( i = 0; i < aligned_size; i += 4 )
|
||||||
checksum += ( buf[i ] << 24 ) |
|
checksum += ( (FT_ULong)buf[i ] << 24 ) |
|
||||||
( buf[i + 1] << 16 ) |
|
( (FT_ULong)buf[i + 1] << 16 ) |
|
||||||
( buf[i + 2] << 8 ) |
|
( (FT_ULong)buf[i + 2] << 8 ) |
|
||||||
( buf[i + 3] << 0 );
|
( (FT_ULong)buf[i + 3] << 0 );
|
||||||
|
|
||||||
/* If size is not aligned to 4, treat as if it is padded with 0s. */
|
/* If size is not aligned to 4, treat as if it is padded with 0s. */
|
||||||
if ( size != aligned_size )
|
if ( size != aligned_size )
|
||||||
|
|
Loading…
Reference in New Issue