From 2b35420fa91d7999423076a516eef9b1572be5af Mon Sep 17 00:00:00 2001 From: Roderick Sheeter Date: Mon, 24 Nov 2014 07:11:04 -0800 Subject: [PATCH] As suggested in https://github.com/google/woff2/pull/2, correct const for top 7 bits --- src/woff2_dec.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/woff2_dec.cc b/src/woff2_dec.cc index fda5d85..f95b570 100644 --- a/src/woff2_dec.cc +++ b/src/woff2_dec.cc @@ -107,7 +107,7 @@ bool ReadBase128(Buffer* buf, uint32_t* value) { return FONT_COMPRESSION_FAILURE(); } // If any of the top seven bits are set then we're about to overflow. - if (result & 0xe0000000) { + if (result & 0xfe000000) { return FONT_COMPRESSION_FAILURE(); } result = (result << 7) | (code & 0x7f);