diff options
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.129 2018/06/06 18:29:18 markus Exp $ */ +/* $OpenBSD: authfile.c,v 1.130 2018/07/09 21:59:10 markus Exp $ */ /* * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. * @@ -59,7 +59,7 @@ sshkey_save_private_blob(struct sshbuf *keybuf, const char *filename) if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0) return SSH_ERR_SYSTEM_ERROR; - if (atomicio(vwrite, fd, (u_char *)sshbuf_ptr(keybuf), + if (atomicio(vwrite, fd, sshbuf_mutable_ptr(keybuf), sshbuf_len(keybuf)) != sshbuf_len(keybuf)) { oerrno = errno; close(fd); |