diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2017-07-06 20:23:06 +0300 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2017-07-07 04:28:20 +0300 |
commit | fde9013ab42411ee2015811c28e8921828a81702 (patch) | |
tree | 1daac4becfff7ded50a065fc59e40dcac38adc8c /libavformat/mpegtsenc.c | |
parent | 3b3501f75cb20b9f7abf43a3a9b1c3de595bc588 (diff) |
mpegtsenc: Don't pass NULL to memcpy
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index acea2e93a6..fdfa544ee2 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -277,6 +277,10 @@ static void putstr8(uint8_t **q_ptr, const char *str, int write_len) len = strlen(str); if (write_len) *q++ = len; + if (!str) { + *q_ptr = q; + return; + } memcpy(q, str, len); q += len; *q_ptr = q; |