[FFmpeg-devel] [PATCH 2/2] mpegtsenc: Don't pass NULL to memcpy
Michael Niedermayer
michael at niedermayer.cc
Fri Jul 7 01:15:16 EEST 2017
On Fri, Jul 07, 2017 at 12:13:02AM +0200, Michael Niedermayer wrote:
> On Thu, Jul 06, 2017 at 06:34:21PM +0100, Derek Buitenhuis wrote:
> > Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> > ---
> > libavformat/mpegtsenc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> > index acea2e93a6..f62ed55dea 100644
> > --- a/libavformat/mpegtsenc.c
> > +++ b/libavformat/mpegtsenc.c
> > @@ -277,6 +277,8 @@ static void putstr8(uint8_t **q_ptr, const char *str, int write_len)
> > len = strlen(str);
> > if (write_len)
> > *q++ = len;
> > + if (!str)
> > + return;
> > memcpy(q, str, len);
> > q += len;
>
> > *q_ptr = q;
>
> this should not be skiped if str==NULL
i just saw you already fixed this and posted a v2
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170707/50c7dc62/attachment.sig>
More information about the ffmpeg-devel
mailing list