On Wed, Apr 29, 2020 at 05:39:36PM +0200, Nicolas George wrote: > Limin Wang (12020-04-29): > > yes, avio_write can process zero len with NULL pointer, but here it'll use > > buf+written_len, so > > it's invalid access I think. So what's the broken? Maybe I haven't catch > > your point. > > What's broken is that the code is supposed to do something, and with > your change it does not do it. > > These changes are therefore not acceptable. > > The invalid access need to be fixed, but they need to be fixed properly: > since they correspond to a memory allocation failure, there should be > some kind of AVERROR(ENOMEM) in there.
Thanks, I catch your point now. Most of existing code haven't return ERROR, so I choose the same way to process it. If you think it's not OK, we'll change more code I think . Also some code weren't check the result, but for the len is 0 and don't broken anything. But yes, the data isn't expected. > > Regards, > > -- > Nicolas George > _______________________________________________ > 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". -- Thanks, Limin Wang _______________________________________________ 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".