The spec seems to allow these to be negative Fixes: left shift of negative value -15 Fixes: 392687035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-6559804532785152
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -147,10 +147,10 @@ static VVCFrame *alloc_frame(VVCContext *s, VVCFrameContext *fc) · 146 unmodified lines | |||
| 147 | for (int j = 0; j < frame->ctb_count; j++) | 147 | for (int j = 0; j < frame->ctb_count; j++) |
| 148 | frame->rpl_tab[j] = frame->rpl; | 148 | frame->rpl_tab[j] = frame->rpl; |
| 149 | 149 | ||
| 150 | win->left_offset = pps->r->pps_scaling_win_left_offset << sps->hshift[CHROMA]; | 150 | win->left_offset = pps->r->pps_scaling_win_left_offset * (1 << sps->hshift[CHROMA]); |
| 151 | win->right_offset = pps->r->pps_scaling_win_right_offset << sps->hshift[CHROMA]; | 151 | win->right_offset = pps->r->pps_scaling_win_right_offset * (1 << sps->hshift[CHROMA]); |
| 152 | win->top_offset = pps->r->pps_scaling_win_top_offset << sps->vshift[CHROMA]; | 152 | win->top_offset = pps->r->pps_scaling_win_top_offset * (1 << sps->vshift[CHROMA]); |
| 153 | win->bottom_offset = pps->r->pps_scaling_win_bottom_offset << sps->vshift[CHROMA]; | 153 | win->bottom_offset = pps->r->pps_scaling_win_bottom_offset * (1 << sps->vshift[CHROMA]); |
| 154 | frame->ref_width = pps->r->pps_pic_width_in_luma_samples - win->left_offset - win->right_offset; | 154 | frame->ref_width = pps->r->pps_pic_width_in_luma_samples - win->left_offset - win->right_offset; |
| 155 | frame->ref_height = pps->r->pps_pic_height_in_luma_samples - win->bottom_offset - win->top_offset; | 155 | frame->ref_height = pps->r->pps_pic_height_in_luma_samples - win->bottom_offset - win->top_offset; |
| 156 | 156 | ||