aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-06-19 23:07:12 -0400
committerMike Frysinger <vapier@gentoo.org>2016-06-19 23:07:12 -0400
commit5000f8ea9c3519fc4e028ab050a58b1f314b2633 (patch)
tree196bbe25b61fb071b760ba9c15c8199c57ef8e0d /scanelf.c
parentpaxelf: use fstat instead of stat && open (diff)
downloadpax-utils-5000f8ea9c3519fc4e028ab050a58b1f314b2633.tar.gz
pax-utils-5000f8ea9c3519fc4e028ab050a58b1f314b2633.tar.bz2
pax-utils-5000f8ea9c3519fc4e028ab050a58b1f314b2633.zip
scanelf: use strcpy to make coverity happy
We know ret is always 7 bytes, and pax_short_hf_flags always returns 7 bytes (including a NUL terminator), so use strcpy to keep coverity from throwing a warning about missing NUL.
Diffstat (limited to 'scanelf.c')
-rw-r--r--scanelf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scanelf.c b/scanelf.c
index 1f3e356..42fe4c5 100644
--- a/scanelf.c
+++ b/scanelf.c
@@ -391,7 +391,7 @@ static char *scanelf_file_pax(elfobj *elf, char *found_pax)
*found_pax = 1;
return (be_wewy_wewy_quiet ? NULL : paxflags);
}
- strncpy(ret, paxflags, sizeof(ret));
+ strcpy(ret, paxflags);
}
if (be_wewy_wewy_quiet || (be_quiet && !shown))