[FFmpeg-devel] 答复: [PATCH] fftools/ffmpeg_ffplay_ffprobe_cmdutils: add -mask_url to replace the protocol address in the command with the asterisk (*)

Wujian(Chin) wujian2 at huawei.com
Wed Dec 28 10:04:39 EET 2022


>On Mon, Dec 26, 2022 at 01:07:51PM +0000, Wujian(Chin) wrote:
>> The issue has been modified. Please review again, thank you!
>> 
>> Signed-off-by: wujian_nanjing <wujian2 at huawei.com>
>> ---
>>  doc/fftools-common-opts.texi | 11 +++++++
>>  fftools/cmdutils.c           | 77 ++++++++++++++++++++++++++++++++++++++++++--
>>  fftools/cmdutils.h           | 25 ++++++++++++++
>>  fftools/ffmpeg.c             | 10 +++---
>>  fftools/ffplay.c             |  9 ++++--
>>  fftools/ffprobe.c            | 10 +++---
>>  6 files changed, 128 insertions(+), 14 deletions(-)

>ffmpeg -h
>segfaults with this patch

>==32366== Invalid read of size 8

I have reproduced the problem.
The reason is that the last element of argv_copy does not end with null. 
Otherwise, this problem will occur.

Thanks.


>==32366==    at 0x30836B: split_commandline (in ffmpeg/ffmpeg_g)
>==32366==    by 0x3039CD: ffmpeg_parse_options (in ffmpeg/ffmpeg_g)
>==32366==    by 0x2ED201: main (in ffmpeg/ffmpeg_g)
>==32366==  Address 0x2ced5290 is 0 bytes after a block of size 16 alloc'd
>==32366==    at 0x4C33E76: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>==32366==    by 0x4C33F91: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>==32366==    by 0x116B322: av_malloc (in ffmpeg/ffmpeg_g)
>==32366==    by 0x116B4D8: av_mallocz (in ffmpeg/ffmpeg_g)
>==32366==    by 0x306469: copy_argv (in ffmpeg/ffmpeg_g)
>==32366==    by 0x306537: handle_arg_param (in ffmpeg/ffmpeg_g)
>==32366==    by 0x2ED1F5: main (in ffmpeg/ffmpeg_g)
>==32366== 

> [...]
>-- 
>Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

>Opposition brings concord. Out of discord comes the fairest harmony.
>-- Heraclitus

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


More information about the ffmpeg-devel mailing list