[FFmpeg-devel] [Patch] parser.c in libavcodec
andy g
agocke
Sun Mar 23 20:56:54 CET 2008
It seems that the return value of av_fast_realloc in parser.c is never
checked - so if the allocation fails for any reason, the function will
proceed normally. I have added a couple of statements in this patch to
prevent this from happening. I am a little unclear on the post-
conditions that the ff_combine_frame function provides, so I simply
set the buffer_size to 0 (since the buffer is null if the allocation
fails) and return -1. This is the cause of a series of SIGSEGVs in the
MLP patch - which unfortunately I now require Ian's help on again.
After running his code with this patch, I noticed that he often
ignores the response of ff_combine_frame in almost every calling of
mlp_parse which leads to a segfault in some cases. I would fix this,
however the function does not provide comments and I am unsure of what
the correct response is to a failure of ff_combine_frame in these
instances.
Thanks,
Andy Gocke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attachment.patch
Type: application/octet-stream
Size: 41044 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080323/27b62d67/attachment.obj>
More information about the ffmpeg-devel
mailing list