From 49f47e656b60bcd1d1db98d88105295f4b4e600d Mon Sep 17 00:00:00 2001 From: "markus@openbsd.org" Date: Mon, 9 Jul 2018 21:59:10 +0000 Subject: upstream: replace cast with call to sshbuf_mutable_ptr(); ok djm@ OpenBSD-Commit-ID: 4dfe9d29fa93d9231645c89084f7217304f7ba29 --- authfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'authfile.c') diff --git a/authfile.c b/authfile.c index c3a6345d3..be4a57736 100644 --- a/authfile.c +++ b/authfile.c @@ -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); -- cgit v1.2.3