Re: [PATCH 1/2] libmpdemux/mf: Replace sprintf by mp_asprintf

Reimar Döffinger <[email protected]> Wed, 28 Apr 2021 21:09:00 +0200
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <[email protected]>
> @@ -142,19 +143,23 @@ mf_t* open_mf(char * filename){
> 
>  while ( error_count < 5 )
>   {
> -   sprintf( fname,filename,count++ );
> +   fname = mp_asprintf( filename,count++ );

A new variable local to this block would make it much easier to argue memory correctness.
This probably also applies to the other usages of this “fname” variable,
but that’s a somewhat separate issue. 
_______________________________________________
MPlayer-dev-eng mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng