Re: [FFmpeg-devel] [PATCH 2/3] avcodec/hevcdec: do not memcpy into itself

2023-09-07 Thread Michael Niedermayer
On Thu, Apr 27, 2023 at 08:38:39PM +0200, Michael Niedermayer wrote:
> Iam not sure if this buffer setup is intended but if it occurs memcpy() 
> cannot always
> be used
> 
> Fixes: memcpy-param-overlap
> Fixes: 
> 58062/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4717458841010176
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/hevcdec.c | 1 +
>  1 file changed, 1 insertion(+)

patch withdrawn, as this is not a complete fix of the issue

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH 2/3] avcodec/hevcdec: do not memcpy into itself

2023-04-27 Thread Michael Niedermayer
Iam not sure if this buffer setup is intended but if it occurs memcpy() cannot 
always
be used

Fixes: memcpy-param-overlap
Fixes: 
58062/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4717458841010176

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/hevcdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 0fa4fdd59d..1e590ec5d0 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -1542,6 +1542,7 @@ static void luma_mc_uni(HEVCLocalContext *lc, uint8_t 
*dst, ptrdiff_t dststride,
 src   += y_off * srcstride + (x_off * (1 << s->ps.sps->pixel_shift));
 
 if (x_off < QPEL_EXTRA_BEFORE || y_off < QPEL_EXTRA_AFTER ||
+s->frame->data[0] == ref->data[0] ||
 x_off >= pic_width - block_w - QPEL_EXTRA_AFTER ||
 y_off >= pic_height - block_h - QPEL_EXTRA_AFTER) {
 const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << 
s->ps.sps->pixel_shift;
-- 
2.17.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".