[FFmpeg-devel] [PATCH] ffplay: dynamically allocate filename buffer
Timo Rothenpieler
timo at rothenpieler.org
Sat Sep 26 22:50:41 CEST 2015
> @@ -3120,7 +3121,10 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat)
> is = av_mallocz(sizeof(VideoState));
> if (!is)
> return NULL;
> - av_strlcpy(is->filename, filename, sizeof(is->filename));
> + is->filename = av_malloc(strlen(filename)+1);
> + if (!is->filename)
> + goto fail;
> + strcpy(is->filename, filename);
av_strdup
> is->iformat = iformat;
> is->ytop = 0;
> is->xleft = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150926/3f430d91/attachment.sig>
More information about the ffmpeg-devel
mailing list