diff options
author | Moonchild <moonchild@palemoon.org> | 2020-11-13 15:59:29 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-18 10:58:22 +0000 |
commit | b645d59b1e170af1cb0963935bd8c915e56c431c (patch) | |
tree | 49fdc8001d5758558ada7a711f31e08095388294 /modules/brotli/enc/block_splitter.c | |
parent | 71e0814af25e8619782294e65aa42aa1044dabdc (diff) | |
download | UXP-b645d59b1e170af1cb0963935bd8c915e56c431c.tar UXP-b645d59b1e170af1cb0963935bd8c915e56c431c.tar.gz UXP-b645d59b1e170af1cb0963935bd8c915e56c431c.tar.lz UXP-b645d59b1e170af1cb0963935bd8c915e56c431c.tar.xz UXP-b645d59b1e170af1cb0963935bd8c915e56c431c.zip |
Issue #1683 - Update Brotli lib to 1.0.9
Diffstat (limited to 'modules/brotli/enc/block_splitter.c')
-rw-r--r-- | modules/brotli/enc/block_splitter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/brotli/enc/block_splitter.c b/modules/brotli/enc/block_splitter.c index d308eca59..deb7c2e15 100644 --- a/modules/brotli/enc/block_splitter.c +++ b/modules/brotli/enc/block_splitter.c @@ -132,7 +132,7 @@ void BrotliSplitBlock(MemoryManager* m, { size_t literals_count = CountLiterals(cmds, num_commands); uint8_t* literals = BROTLI_ALLOC(m, uint8_t, literals_count); - if (BROTLI_IS_OOM(m)) return; + if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(literals)) return; /* Create a continuous array of literals. */ CopyLiteralsToByteArray(cmds, num_commands, data, pos, mask, literals); /* Create the block split on the array of literals. @@ -150,7 +150,7 @@ void BrotliSplitBlock(MemoryManager* m, /* Compute prefix codes for commands. */ uint16_t* insert_and_copy_codes = BROTLI_ALLOC(m, uint16_t, num_commands); size_t i; - if (BROTLI_IS_OOM(m)) return; + if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(insert_and_copy_codes)) return; for (i = 0; i < num_commands; ++i) { insert_and_copy_codes[i] = cmds[i].cmd_prefix_; } @@ -170,7 +170,7 @@ void BrotliSplitBlock(MemoryManager* m, uint16_t* distance_prefixes = BROTLI_ALLOC(m, uint16_t, num_commands); size_t j = 0; size_t i; - if (BROTLI_IS_OOM(m)) return; + if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(distance_prefixes)) return; for (i = 0; i < num_commands; ++i) { const Command* cmd = &cmds[i]; if (CommandCopyLen(cmd) && cmd->cmd_prefix_ >= 128) { |