=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/schnorr.c,v retrieving revision 1.5.10.1 retrieving revision 1.6 diff -u -r1.5.10.1 -r1.6 --- src/usr.bin/ssh/Attic/schnorr.c 2013/11/08 05:52:21 1.5.10.1 +++ src/usr.bin/ssh/Attic/schnorr.c 2013/05/16 09:08:41 1.6 @@ -1,4 +1,4 @@ -/* $OpenBSD: schnorr.c,v 1.5.10.1 2013/11/08 05:52:21 djm Exp $ */ +/* $OpenBSD: schnorr.c,v 1.6 2013/05/16 09:08:41 dtucker Exp $ */ /* * Copyright (c) 2008 Damien Miller. All rights reserved. * @@ -484,12 +484,13 @@ { char *out, *h; va_list args; + int ret; out = NULL; va_start(args, fmt); - vasprintf(&out, fmt, args); + ret = vasprintf(&out, fmt, args); va_end(args); - if (out == NULL) + if (ret == -1 || out == NULL) fatal("%s: vasprintf failed", __func__); if (n == NULL) @@ -509,12 +510,13 @@ char *out, h[65]; u_int i, j; va_list args; + int ret; out = NULL; va_start(args, fmt); - vasprintf(&out, fmt, args); + ret = vasprintf(&out, fmt, args); va_end(args); - if (out == NULL) + if (ret == -1 || out == NULL) fatal("%s: vasprintf failed", __func__); debug3("%s length %u%s", out, len, buf == NULL ? " (null)" : ""); @@ -543,7 +545,7 @@ { struct modp_group *ret; - ret = xcalloc(1, sizeof(*ret)); + ret = xmalloc(sizeof(*ret)); ret->p = ret->q = ret->g = NULL; if (BN_hex2bn(&ret->p, grp_p) == 0 || BN_hex2bn(&ret->g, grp_g) == 0)