mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Fix encoder_state_init, which was making out of bound reads
This commit is contained in:
parent
37c20b8ce5
commit
66e730ba94
|
@ -1073,7 +1073,8 @@ int encoder_state_init(encoder_state * const child_state, encoder_state * const
|
||||||
//Find LCU above
|
//Find LCU above
|
||||||
if (child_state->type == ENCODER_STATE_TYPE_WAVEFRONT_ROW) {
|
if (child_state->type == ENCODER_STATE_TYPE_WAVEFRONT_ROW) {
|
||||||
int j;
|
int j;
|
||||||
for (j=0; child_state->parent->children[j].encoder_control; ++j) {
|
//For all previous wavefront rows
|
||||||
|
for (j=0; &child_state->parent->children[j] != child_state && child_state->parent->children[j].encoder_control; ++j) {
|
||||||
if (child_state->parent->children[j].wfrow->lcu_offset_y == child_state->wfrow->lcu_offset_y - 1) {
|
if (child_state->parent->children[j].wfrow->lcu_offset_y == child_state->wfrow->lcu_offset_y - 1) {
|
||||||
int k;
|
int k;
|
||||||
for (k=0; k < child_state->parent->children[j].lcu_order_count; ++k) {
|
for (k=0; k < child_state->parent->children[j].lcu_order_count; ++k) {
|
||||||
|
|
Loading…
Reference in a new issue