Original commit message from CVS: * ext/theora/theoraenc.c: (theora_enc_chain): Check return value of theora_encode_header(), or we might try to allocate a random number of bytes. theora_encode_header() can fail if libtheora has been compiled with encoding support disabled. Fixes #398110.