diff options
author | Martin Nordholts <enselic@gmail.com> | 2021-01-03 08:00:30 +0100 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2021-06-12 00:16:53 -0700 |
commit | 69eb0a98ebc556af8742010745a466d39c048946 (patch) | |
tree | e7076c6ccce16246f1f4ec8c2ef687c9f78c4e08 /src/rmd_cache_frame.c | |
parent | aff8d41105bc7f17ff7ac44abbcfb075ba8e7928 (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]
Diffstat (limited to 'src/rmd_cache_frame.c')
-rw-r--r-- | src/rmd_cache_frame.c | 2 |
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++; |