Fixes: use of uninitialized memory Fixes: 375286238/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-6352546854141952
Unified · Split
| @@ -783,6 +783,8 @@ static void decode_gray_bitstream(HYuvDecContext *s, int count) · 782 unmodified lines | ||
| 783 | 783 | for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { |
| 784 | 784 | READ_2PIX(s->temp[0][2 * i], s->temp[0][2 * i + 1], 0); |
| 785 | 785 | } |
| 786 | + for (; i < count; i++) | |
| 787 | + s->temp[0][2 * i] = s->temp[0][2 * i + 1] = 0; | |
| 786 | 788 | } else { |
| 787 | 789 | for (i = 0; i < count; i++) { |
| 788 | 790 | READ_2PIX(s->temp[0][2 * i], s->temp[0][2 * i + 1], 0); |