[libav-bugs] [Bug 75] av_opt_find2() segfaults

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Fri Nov 18 19:26:49 CET 2011


--- Comment #7 from Ondrej Perutka <perutka.ondrej at gmail.com> 2011-11-18 19:26:49 CET ---
Look, the problem seems to be obvious to me. av_opt_find2() is trying to
dereference a NULL pointer if you pass NULL as its first argument. The solution
is easy, you can put:

if (!obj) return NULL;


const AVClass  *c = *(AVClass**)obj;

- the get_number() method will get NULL and it'll return -1
- av_opt_get_int() will also return -1
- and ff_rtp_get_payload_type() will use static or dynamic payload type

Configure bugmail: http://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list