Re: [FFmpeg-devel] [PATCH 3/6] avformat/aviobuf: Don't use NULL as src for memcpy

2022-09-28 Thread Andreas Rheinhardt
James Almer: > On 9/28/2022 3:58 PM, Andreas Rheinhardt wrote: >> This might happen in avio_write() if size == 0 >> when the direct codepath is taken. It is undefined behaviour >> according to the spec although it happens to work in practice. >> Fixes the webm-webvtt-remux FATE-test under UBSan. >>

Re: [FFmpeg-devel] [PATCH 3/6] avformat/aviobuf: Don't use NULL as src for memcpy

2022-09-28 Thread James Almer
On 9/28/2022 3:58 PM, Andreas Rheinhardt wrote: This might happen in avio_write() if size == 0 when the direct codepath is taken. It is undefined behaviour according to the spec although it happens to work in practice. Fixes the webm-webvtt-remux FATE-test under UBSan. Signed-off-by: Andreas Rhe

[FFmpeg-devel] [PATCH 3/6] avformat/aviobuf: Don't use NULL as src for memcpy

2022-09-28 Thread Andreas Rheinhardt
This might happen in avio_write() if size == 0 when the direct codepath is taken. It is undefined behaviour according to the spec although it happens to work in practice. Fixes the webm-webvtt-remux FATE-test under UBSan. Signed-off-by: Andreas Rheinhardt --- libavformat/aviobuf.c | 4 +++- 1 fi