mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
virNetLibsshAuthenticatePrivkeyCb: Use virStrcpy instead of virStrncpy
We already assume that 'retr_passphrase.result' is a string, thus we can use virStrcpy instead. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
1b50f2d102
commit
2d91b1405d
@ -437,8 +437,7 @@ virNetLibsshAuthenticatePrivkeyCb(const char *prompt,
|
||||
return -1;
|
||||
}
|
||||
|
||||
p = virStrncpy(buf, retr_passphrase.result,
|
||||
retr_passphrase.resultlen, len);
|
||||
p = virStrcpy(buf, retr_passphrase.result, len);
|
||||
virSecureEraseString(retr_passphrase.result);
|
||||
g_free(retr_passphrase.result);
|
||||
if (p < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user