Files
roytam1 89830cff26 disable log2 in jsmath, and import changes from tenfourfox:
- #334: more tele from TabBrowser; also remove gMultiProcessBrowser since we don't support it (16f8592aa)
- #431: M1388354 M1388014 (da843afa1)
- #438: M1393098 (539efce0c)
- #388: M1354564 (d375d57d3)
- #429: Brotli 1.0.1 (c69914a5a) (with ppc-only defines removed)
- #429: install modules/woff2 (current to Fx57) (87b560912) (with ppc-only defines removed)
- #429: update OTS to 5.2.0 plus patches and M1396026 (1ce2a83ec) (with binary literals removed)
- #317: update graphite2 to 1.3.10 (f4bf5ad97)
- #429: update Harfbuzz to 1.5.1 (083639c71)
- #317: patch thebes for graphite2 alignment issues; enable graphite fonts (b7fead52b)
- #434: adjust video queue settings; Mach factor decode delay logic (default off) (9b5b09a6c)
- clean up a couple warnings (f37f7669d)
- #426: M1385395 (b8ebae839)
- #438: M1375599 (84bfb83b1)
- #442: M1381157 (ffbe7ea3a)
2018-05-31 14:43:36 +08:00

67 lines
2.7 KiB
Diff

diff --git a/gfx/ots/src/glat.cc b/gfx/ots/src/glat.cc
--- a/gfx/ots/src/glat.cc
+++ b/gfx/ots/src/glat.cc
@@ -5,7 +5,7 @@
#include "glat.h"
#include "gloc.h"
-#include "lz4.h"
+#include "mozilla/Compression.h"
#include <list>
namespace ots {
@@ -201,14 +201,15 @@ bool OpenTypeGLAT_v3::Parse(const uint8_t* data, size_t length,
return DropGraphite("Illegal nested compression");
}
std::vector<uint8_t> decompressed(this->compHead & FULL_SIZE);
- int ret = LZ4_decompress_safe_partial(
+ size_t outputSize = 0;
+ bool ret = mozilla::Compression::LZ4::decompressPartial(
reinterpret_cast<const char*>(data + table.offset()),
- reinterpret_cast<char*>(decompressed.data()),
table.remaining(), // input buffer size (input size + padding)
+ reinterpret_cast<char*>(decompressed.data()),
decompressed.size(), // target output size
- decompressed.size()); // output buffer size
- if (ret != decompressed.size()) {
- return DropGraphite("Decompression failed with error code %d", ret);
+ &outputSize); // return output size
+ if (!ret || outputSize != decompressed.size()) {
+ return DropGraphite("Decompression failed");
}
return this->Parse(decompressed.data(), decompressed.size(), true);
}
diff --git a/gfx/ots/src/silf.cc b/gfx/ots/src/silf.cc
--- a/gfx/ots/src/silf.cc
+++ b/gfx/ots/src/silf.cc
@@ -5,7 +5,7 @@
#include "silf.h"
#include "name.h"
-#include "lz4.h"
+#include "mozilla/Compression.h"
#include <cmath>
namespace ots {
@@ -39,14 +39,15 @@ bool OpenTypeSILF::Parse(const uint8_t* data, size_t length,
return DropGraphite("Illegal nested compression");
}
std::vector<uint8_t> decompressed(this->compHead & FULL_SIZE);
- int ret = LZ4_decompress_safe_partial(
+ size_t outputSize = 0;
+ bool ret = mozilla::Compression::LZ4::decompressPartial(
reinterpret_cast<const char*>(data + table.offset()),
- reinterpret_cast<char*>(decompressed.data()),
table.remaining(), // input buffer size (input size + padding)
+ reinterpret_cast<char*>(decompressed.data()),
decompressed.size(), // target output size
- decompressed.size()); // output buffer size
- if (ret != decompressed.size()) {
- return DropGraphite("Decompression failed with error code %d", ret);
+ &outputSize); // return output size
+ if (!ret || outputSize != decompressed.size()) {
+ return DropGraphite("Decompression failed");
}
return this->Parse(decompressed.data(), decompressed.size(), true);
}