GNOME Bugzilla – Bug 738793
speex: encoder/decoder segfault when resetting multiple times
Last modified: 2014-10-24 19:55:31 UTC
Created attachment 288827 [details] [review] Patch for protection againt multi-time SpeexBits destroy The speex decoder/encoder may destroy SpeexBits more multi-time (call speex_bits_destroy(&dec->bits) more than once) and produce a SIGSEV. After destroying bits in gst_speex_dec_reset() and gst_speex_enc_stop(), we should add something like: speex_bits_set_bit_buffer(&dec->bits, NULL, 0); or dec->bits.owner = 0;
Comment on attachment 288827 [details] [review] Patch for protection againt multi-time SpeexBits destroy Might be better to just memset() the complete bits to 0. Also please attach the patch in "git format-patch" format with your real name and mail address :)
Sorry for the patch format. Maybe calling speex_bits_set_bit_buffer... is the best, it will let speex guys do what they want with their "opaque" SpeexBits structure. Attached the "format-patch" patch :)
Created attachment 289120 [details] [review] Patch for protection againt multi-time SpeexBits destroy (using speex_bits_set_bit_buffer)
commit ec3af50cc26be86e36368f328d5ef489a3bc1dc9 Author: Ananda <ananda@latelier23.com> Date: Wed Oct 22 15:28:44 2014 +0200 speex: Fix segfault when resetting the codecs multiple times https://bugzilla.gnome.org/show_bug.cgi?id=738793
Cherry-picked into 1.4 branch as well.