Opened 9 years ago

Last modified 9 years ago

#4507 new defect

smbclient cause ffmpeg crash

Reported by: chuan Owned by:
Priority: normal Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
I enable smbclient.
When read system hidden file, ffmpeg crash.
As command, "AlbumArtSmall.jpg" is windows system hidden file,
if set it as input file, then ffmpeg crashed

How to reproduce:

% gdb --args ./ffmpeg_g -i smb://Samba:123456@mi-20141201vdpk/users/Administrator/Music//AlbumArtSmall.jpg -f ffmetas

stacks:
#0  0x00007ffff40d4841 in ?? () from /usr/lib/x86_64-linux-gnu/libsmbclient.so.0
#1  0x00007ffff74d054f in ?? () from /usr/local/lib/libavformat.so.56
#2  0x00007ffff74ebb59 in ?? () from /usr/local/lib/libavformat.so.56
#3  0x00007ffff74ebb93 in ffurl_close () from /usr/local/lib/libavformat.so.56
#4  0x00007ffff75ee6af in avformat_close_input () from /usr/local/lib/libavformat.so.56
#5  0x0000000000423110 in ffmpeg_cleanup (ret=1) at ffmpeg.c:498
#6  0x000000000040aae1 in exit_program (ret=1) at cmdutils.c:124
#7  0x000000000040875f in main (argc=5, argv=0x7fffffffe098) at ffmpeg.c:4055


version:
ffmpeg version N-43282-gc4b2017 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
configuration: --enable-shared --enable-gpl --enable-libsmbclient --enable-version3
libavutil      54. 22.100 / 54. 22.100
libavcodec     56. 34.100 / 56. 34.100
libavformat    56. 29.100 / 56. 29.100
libavdevice    56.  4.100 / 56.  4.100
libavfilter     5. 13.101 /  5. 13.101
libswscale      3.  1.101 /  3.  1.101
libswresample   1.  1.100 /  1.  1.100
libpostproc    53.  3.100 / 53.  3.100


built on:
built with gcc 4.9.1 (Ubuntu 4.9.1-16ubuntu6)

thanks

Change History (2)

comment:1 by chuan, 9 years ago

Component: undeterminedavformat
Version: unspecifiedgit-master

comment:2 by chuan, 9 years ago

The hidden file is not the key point, any jpg shared by windows will cause crash.
I compiled debug version. The stacks is:

#0  0x00007ffff40cfa24 in SMBC_close_ctx () from /usr/local/samba/lib/libsmbclient.so.0
#1  0x00007ffff40c5ff8 in smbc_close () from /usr/local/samba/lib/libsmbclient.so.0
#2  0x00007ffff74d0587 in libsmbc_close (h=<optimized out>) at libavformat/libsmbclient.c:88
#3  0x00007ffff74ebb99 in ffurl_closep (hh=hh@entry=0x7fffffffd8f8) at libavformat/avio.c:376
#4  0x00007ffff74ebbd3 in ffurl_close (h=0x647400) at libavformat/avio.c:392
#5  0x00007ffff74eef25 in avio_close (s=s@entry=0x658960) at libavformat/aviobuf.c:936
#6  0x00007ffff75ee6ef in avformat_close_input (ps=0x66f100) at libavformat/utils.c:3653
#7  0x00000000004230b0 in ffmpeg_cleanup (ret=1) at ffmpeg.c:498
#8  0x000000000040aae1 in exit_program (ret=1) at cmdutils.c:124
#9  0x000000000040875f in main (argc=5, argv=0x7fffffffe0a8) at ffmpeg.c:4055

I guess libsmbc_close errored called one more times.

Note: See TracTickets for help on using tickets.