[Ffmpeg-devel] PATCH: Crash in probe with NULL filename
Michael Niedermayer
michaelni
Wed Dec 20 00:33:58 CET 2006
Hi
On Tue, Dec 19, 2006 at 11:14:41PM +0100, elupus wrote:
> Image2 demuxer's crashes if probe function is called with a null filename.
> Seems only be this one place, thus it could be a point in checking it in
> lavf.
>
> /Joakim
> Index: img2.c
> ===================================================================
> --- img2.c (revision 7332)
> +++ img2.c (working copy)
> @@ -154,6 +154,8 @@
>
> static int image_probe(AVProbeData *p)
> {
> + if(!p->filename)
> + return 0;
> if (av_str2id(img_tags, p->filename)) {
> if (av_filename_number_test(p->filename))
> return AVPROBE_SCORE_MAX;
inconsistant indention and
if (p->filename && av_str2id(img_tags, p->filename)) {
would be simpler IMHO
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
More information about the ffmpeg-devel
mailing list