Commit ad80858b authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Convert to uint32_t before left shift

This avoids undefined behavior when a byte is left shift by 24.

BUG=aomedia:932

Change-Id: If84c65a5e28f443424f416342be870e483622c33
parent c24351c0
......@@ -506,7 +506,7 @@ aom_codec_err_t av1_parse_superframe_index(const uint8_t *data, size_t data_sz,
for (i = 0; i < frames - 1; ++i) {
uint32_t this_sz = 0;
for (j = 0; j < mag; ++j) this_sz |= (*x++) << (j * 8);
for (j = 0; j < mag; ++j) this_sz |= ((uint32_t)(*x++)) << (j * 8);
this_sz += 1;
sizes[i] = this_sz;
frame_sz_sum += this_sz;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment