From 716a29545f8a5316570387602eb7c22de9e0ffe3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 12 Dec 2017 12:53:05 -0500 Subject: [PATCH] fix strncpy not leaving null terminator space --- src/zm_ffmpeg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_ffmpeg.cpp b/src/zm_ffmpeg.cpp index c73da27e8..43e9696f7 100644 --- a/src/zm_ffmpeg.cpp +++ b/src/zm_ffmpeg.cpp @@ -208,7 +208,7 @@ int hacked_up_context2_for_older_ffmpeg(AVFormatContext **avctx, AVOutputFormat } #endif - if (filename) strncpy(s->filename, filename, sizeof(s->filename)); + if (filename) strncpy(s->filename, filename, sizeof(s->filename)-1); *avctx = s; return 0; }