Another left-shift bug (#45681). * src/base/ftobjs.c (IsMacBinary): Only accept positive values for `dlen'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
diff --git a/ChangeLog b/ChangeLog
index b78fcbe..c8ddab7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-08-04 Werner Lemberg <wl@gnu.org>
+
+ Another left-shift bug (#45681).
+
+ * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
+ `dlen'.
+
2015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Fix `ft_corner_orientation'.
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 9c3332c..4fa0593 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1889,13 +1889,14 @@
if ( error )
goto Exit;
- if ( header[ 0] != 0 ||
- header[74] != 0 ||
- header[82] != 0 ||
- header[ 1] == 0 ||
- header[ 1] > 33 ||
- header[63] != 0 ||
- header[2 + header[1]] != 0 )
+ if ( header[ 0] != 0 ||
+ header[74] != 0 ||
+ header[82] != 0 ||
+ header[ 1] == 0 ||
+ header[ 1] > 33 ||
+ header[63] != 0 ||
+ header[2 + header[1]] != 0 ||
+ header[0x53] > 0x7F )
return FT_THROW( Unknown_File_Format );
dlen = ( header[0x53] << 24 ) |