Steven Liu (12020-04-09): > It’s unnecessary here, > I have checked all strdup return checker in hlsenc some month ago, and double > check the workflow in update_master_pl_info, > It's the safe whether you check the strdup or not. > Reference commit id: 61aa77272a25d83e5ce5c63d93c64bb9a3e15557
Honestly, I think that relying on string functions to all check for NULL to guard against a memory allocation failure is very terrible design. More importantly, it is fragile: it takes only one string function that does not support NULL to make it crash. And since it is neither obvious nor documented in the code (I am not talking about the doxy of the string functions, I am talking about the fact that it relies on it), you will endlessly get patches like that to restore them. And if somebody decides to copy the code but is not careful about the string function it uses, again, crash. I vote for properly checking memory allocations as they happen. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".