Page MenuHomePhabricator

[test-suite] Work around undefined behaviour in lencod

Authored by ostannard on Mar 30 2020, 4:26 AM.



The NUM_BLOCK_TYPES macro is defined to 10, but the arrays in ctx_tables.h only have 8 elements in the relevant dimension, so this was causing out of bounds array accesses, and segfaults if we were (un)lucky.

This is almost exactly the same change as was made to ldecod in D74770.

Diff Detail

Event Timeline

ostannard created this revision.Mar 30 2020, 4:26 AM
kristof.beyls accepted this revision.Mar 30 2020, 5:47 AM

Assuming there is no change in output, LGTM.

This revision is now accepted and ready to land.Mar 30 2020, 5:47 AM