Fixes use of uninitialized value, reported by MSAN. Found by OSS-Fuzz. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -236,6 +236,7 @@ int ff_combine_frame(ParseContext *pc, int next, · 235 unmodified lines | |||
| 236 | } | 236 | } |
| 237 | pc->buffer = new_buffer; | 237 | pc->buffer = new_buffer; |
| 238 | memcpy(&pc->buffer[pc->index], *buf, *buf_size); | 238 | memcpy(&pc->buffer[pc->index], *buf, *buf_size); |
| 239 | memset(&pc->buffer[pc->index + *buf_size], 0, AV_INPUT_BUFFER_PADDING_SIZE); | ||
| 239 | pc->index += *buf_size; | 240 | pc->index += *buf_size; |
| 240 | return -1; | 241 | return -1; |
| 241 | } | 242 | } |