diff options
author | Steve Dickson <steved@redhat.com> | 2018-11-08 13:01:15 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2018-11-08 13:28:50 -0500 |
commit | 9e738dff3133bc64612f298dffd667fe30e0d19e (patch) | |
tree | cd3ad3c33a021fdb89cfe0d9b90630663ba36be3 /src | |
parent | 959b2001458bca8f9228014371aad6ccbeb95a68 (diff) | |
download | ti-rpc-9e738dff3133bc64612f298dffd667fe30e0d19e.tar.gz |
__getpublickey_real: Removed a warning
In function ‘__getpublickey_real.part.0’,
inlined from ‘__getpublickey_real’:
getpublickey.c:77:9: warning: ‘strncpy’ output may be truncated copying 47 bytes from a string of length 143 [-Wstringop-truncation]
(void) strncpy(publickey, lookup, HEXKEYBYTES-1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/getpublickey.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/getpublickey.c b/src/getpublickey.c index 8cf4dc2..be37a24 100644 --- a/src/getpublickey.c +++ b/src/getpublickey.c @@ -74,7 +74,7 @@ __getpublickey_real(netname, publickey) return (0); } *p = '\0'; - (void) strncpy(publickey, lookup, HEXKEYBYTES); + memcpy(publickey, lookup, HEXKEYBYTES); publickey[HEXKEYBYTES] = '\0'; return (1); } |