Limin Wang (12020-04-09):
> Sorry, it seems that I remove these checking when av_dirname claims to support
> NULL for path in the API comments like glib dirname function. So I think it's
> duplicate check if the function claims to support NULL.

"Supporting NULL" can mean anything, and therefore means nothing. You
should have tested that your new code produced the exact same results as
the old code. Apparently, you neglected to do that.

In the future, remember: if you change something non trivial, test it.

> I don't know why dirname support NULL? 

It was a terrible idea: NULL is not a valid file name, and therefore it
makes no sense to take its dir name.

This is "defensive programming": returning random results for invalid
values instead of errorring properly. It is a very bad habit, it leads
to corrupted files and security issues.

Regards,

-- 
  Nicolas George

Attachment: 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".

Reply via email to