=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshkey-xmss.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/ssh/sshkey-xmss.c 2018/07/09 21:59:10 1.3 +++ src/usr.bin/ssh/sshkey-xmss.c 2019/06/27 18:03:37 1.4 @@ -1,4 +1,4 @@ -/* $OpenBSD: sshkey-xmss.c,v 1.3 2018/07/09 21:59:10 markus Exp $ */ +/* $OpenBSD: sshkey-xmss.c,v 1.4 2019/06/27 18:03:37 deraadt Exp $ */ /* * Copyright (c) 2017 Markus Friedl. All rights reserved. * @@ -461,9 +461,9 @@ } if ((filename = k->xmss_filename) == NULL) goto done; - if (asprintf(&lockfile, "%s.lock", filename) < 0 || - asprintf(&statefile, "%s.state", filename) < 0 || - asprintf(&ostatefile, "%s.ostate", filename) < 0) { + if (asprintf(&lockfile, "%s.lock", filename) == -1 || + asprintf(&statefile, "%s.state", filename) == -1 || + asprintf(&ostatefile, "%s.ostate", filename) == -1) { ret = SSH_ERR_ALLOC_FAIL; goto done; } @@ -588,9 +588,9 @@ state->idx = idx; if ((filename = k->xmss_filename) == NULL) goto done; - if (asprintf(&statefile, "%s.state", filename) < 0 || - asprintf(&ostatefile, "%s.ostate", filename) < 0 || - asprintf(&nstatefile, "%s.nstate", filename) < 0) { + if (asprintf(&statefile, "%s.state", filename) == -1 || + asprintf(&ostatefile, "%s.ostate", filename) == -1 || + asprintf(&nstatefile, "%s.nstate", filename) == -1) { ret = SSH_ERR_ALLOC_FAIL; goto done; }