> 2020年4月9日 下午4:49,Nicolas George <geo...@nsup.org> 写道:
> 
> 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.
I think every body have themselves reason to checking memory and remove the 
checking at here.
Whatever for me you can add them here for somebody copy, other body remove them 
some days(maybe long time later) some body remove remove the for unnecessary 
processing.

Thanks

Steven Liu

_______________________________________________
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".

Reply via email to