[FFmpeg-devel] [PATCH] lavu/hash: make all functions work gracefully with NULL.

Nicolas George george at nsup.org
Sun Apr 20 23:59:08 CEST 2014

Le primidi 1er floréal, an CCXXII, Michael Niedermayer a écrit :
> does it allow to simplify any existing code ?

This one, probably not: ignoring errors is still evil, and should be
discouraged / fixed. I would say it is rather a matter of making bugs
(unchecked calls) have less serious consequences: empty hashes instead of
NULL dereference. OTOH, I believe a NULL dereference is not exploitable and
is detectable immediately, which is good, while an empty hash is hiding the
bug, and may cause security concerns.

So I do not know if it is a good idea or not. It was just easy to write
while waiting on compilation.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140420/e230a502/attachment.asc>

More information about the ffmpeg-devel mailing list