[FFmpeg-devel] [PATCH 2/2] mpegtsenc: Don't pass NULL to memcpy
Derek Buitenhuis
derek.buitenhuis at gmail.com
Thu Jul 6 20:34:21 EEST 2017
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;
--
2.11.0
More information about the ffmpeg-devel
mailing list