From 69eb0a98ebc556af8742010745a466d39c048946 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sun, 3 Jan 2021 08:00:30 +0100 Subject: Use memcpy to copy FRAM, not strncpy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] --- src/rmd_cache_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rmd_cache_frame.c') diff --git a/src/rmd_cache_frame.c b/src/rmd_cache_frame.c index f353c79..fce4556 100644 --- a/src/rmd_cache_frame.c +++ b/src/rmd_cache_frame.c @@ -166,7 +166,7 @@ void *rmdCacheImageBuffer(ProgData *pdata) gzsetparams(icf->gzfp, 0, Z_FILTERED); } - strncpy(fheader.frame_prefix, "FRAM", 4); + memcpy(fheader.frame_prefix, "FRAM", 4); fheader.capture_frameno = capture_frameno; frameno++; -- cgit v1.2.3