Skip to content
Snippets Groups Projects
Commit 5c497554 authored by Timothy Nikkel's avatar Timothy Nikkel
Browse files
parent 1064ab36
No related branches found
No related tags found
No related merge requests found
Changes made to pristine libwebp source by mozilla.org developers.
2022/05/06 -- Cherry-pick upstream crash fix (bug 1761275).
2023/03/06 -- Cherry-pick upstream fix (bug 1819244).
2022/02/03 -- Enabled automatic updates via Updatebot (meta bug #1618282). For
further updates to the library please review the mercurial
......
......@@ -13,6 +13,7 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "src/enc/vp8i_enc.h"
#include "src/dsp/dsp.h"
......@@ -148,6 +149,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height,
}
} else {
VP8LBitWriterWipeOut(&tmp_bw);
memset(&result->bw, 0, sizeof(result->bw));
return 0;
}
}
......@@ -162,7 +164,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height,
header = method | (filter << 2);
if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4;
VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size);
if (!VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size)) ok = 0;
ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN);
ok = ok && VP8BitWriterAppend(&result->bw, output, output_size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment