summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Nordholts <enselic@gmail.com>2021-01-03 08:00:30 +0100
committerVito Caputo <vcaputo@pengaru.com>2021-06-12 00:16:53 -0700
commit69eb0a98ebc556af8742010745a466d39c048946 (patch)
treee7076c6ccce16246f1f4ec8c2ef687c9f78c4e08
parentaff8d41105bc7f17ff7ac44abbcfb075ba8e7928 (diff)
Use memcpy to copy FRAM, not strncpy
Fixes: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
-rw-r--r--src/rmd_cache_frame.c2
1 files changed, 1 insertions, 1 deletions
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++;
© All Rights Reserved