mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = virStrncpy(buf, retr_passphrase.result,
|
p = virStrcpy(buf, retr_passphrase.result, len);
|
||||||
retr_passphrase.resultlen, len);
|
|
||||||
virSecureEraseString(retr_passphrase.result);
|
virSecureEraseString(retr_passphrase.result);
|
||||||
g_free(retr_passphrase.result);
|
g_free(retr_passphrase.result);
|
||||||
if (p < 0) {
|
if (p < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user