mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
avcodec/vvc/dec: require all slices of a frame to use the same PH and PPS
The testcases reproduce since b0c77e5a12.
Fixes: out of array read
Fixes: fAak9zecyttL/testcase/poc.vvc
Fixes: fAak9zecyttL/testcase/poc-entry-points.vvc
Fixes: fAak9zecyttL
Found-by: mzfr <security@mzfr.me>
This commit is contained in:
1 parent
2c515eea07
commit
507e9ad286
1 file changed
+9
@@ -965,6 +965,15 @@ static int decode_slice(VVCContext *s, VVCFrameContext *fc, AVBufferRef *buf_ref
|
||||
ret = frame_setup(fc, s);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
} else {
|
||||
const H266RawSlice *first = fc->slices[0]->ref;
|
||||
const H266RawSlice *slice = sc->ref;
|
||||
|
||||
if (slice->ph != first->ph || slice->pps != first->pps) {
|
||||
av_log(fc->log_ctx, AV_LOG_ERROR,
|
||||
"Slice does not use the PH and PPS of the first slice.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
|
||||
ret = slice_start(sc, s, fc, unit, is_first_slice);
|
||||
|
||||
Reference in new issue
Block a user