summaryrefslogtreecommitdiffstats
path: root/media/libvpx/cast-char-to-uint-before-shift.patch
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /media/libvpx/cast-char-to-uint-before-shift.patch
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/libvpx/cast-char-to-uint-before-shift.patch')
-rw-r--r--media/libvpx/cast-char-to-uint-before-shift.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/media/libvpx/cast-char-to-uint-before-shift.patch b/media/libvpx/cast-char-to-uint-before-shift.patch
new file mode 100644
index 000000000..b5d0c4f45
--- /dev/null
+++ b/media/libvpx/cast-char-to-uint-before-shift.patch
@@ -0,0 +1,28 @@
+# HG changeset patch
+# User Gerald Squelart <gsquelart@mozilla.com>
+# Parent 3d0a39b9f8cd9b07dac0263cfbaa23649d8b3138
+Bug 1224371 - Cast uint8_t to uint32_t before shift - r=jya
+
+Note: C-style cast because it is C code.
+
+diff --git a/media/libvpx/vp9/decoder/vp9_decoder.c b/media/libvpx/vp9/decoder/vp9_decoder.c
+--- a/media/libvpx/vp9/decoder/vp9_decoder.c
++++ b/media/libvpx/vp9/decoder/vp9_decoder.c
+@@ -494,16 +494,16 @@ vpx_codec_err_t vp9_parse_superframe_ind
+ decrypt_cb(decrypt_state, x, clear_buffer, frames * mag);
+ x = clear_buffer;
+ }
+
+ for (i = 0; i < frames; ++i) {
+ uint32_t this_sz = 0;
+
+ for (j = 0; j < mag; ++j)
+- this_sz |= (*x++) << (j * 8);
++ this_sz |= (uint32_t)(*x++) << (j * 8);
+ sizes[i] = this_sz;
+ }
+ *count = frames;
+ }
+ }
+ return VPX_CODEC_OK;
+ }