diff options
author | markus@openbsd.org <markus@openbsd.org> | 2018-07-09 21:59:10 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-07-10 16:44:17 +1000 |
commit | 49f47e656b60bcd1d1db98d88105295f4b4e600d (patch) | |
tree | 95ace6a7ae985233385ba2799b82a4672238f9aa /authfile.c | |
parent | cb30cd47041edb03476be1c8ef7bc1f4b69d1555 (diff) |
upstream: replace cast with call to sshbuf_mutable_ptr(); ok djm@
OpenBSD-Commit-ID: 4dfe9d29fa93d9231645c89084f7217304f7ba29
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/authfile.c b/authfile.c index c3a6345d3..be4a57736 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: authfile.c,v 1.129 2018/06/06 18:29:18 markus Exp $ */ | 1 | /* $OpenBSD: authfile.c,v 1.130 2018/07/09 21:59:10 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -59,7 +59,7 @@ sshkey_save_private_blob(struct sshbuf *keybuf, const char *filename) | |||
59 | 59 | ||
60 | if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0) | 60 | if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0) |
61 | return SSH_ERR_SYSTEM_ERROR; | 61 | return SSH_ERR_SYSTEM_ERROR; |
62 | if (atomicio(vwrite, fd, (u_char *)sshbuf_ptr(keybuf), | 62 | if (atomicio(vwrite, fd, sshbuf_mutable_ptr(keybuf), |
63 | sshbuf_len(keybuf)) != sshbuf_len(keybuf)) { | 63 | sshbuf_len(keybuf)) != sshbuf_len(keybuf)) { |
64 | oerrno = errno; | 64 | oerrno = errno; |
65 | close(fd); | 65 | close(fd); |