[FFmpeg-devel] [PATCH 1/5] avformat/dashenc: fix invalid pointer access if avio_get_dyn_buf failed

lance.lmwang at gmail.com lance.lmwang at gmail.com
Wed Apr 29 18:47:50 EEST 2020


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 at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list