Skip to content

Commit 5a5440b

Browse files
committed
proto_handshake: fix clean-up on mkkeys() failure
Reported by: ChronoNova Bug bounty: $10 ("harmless")
1 parent 2dd617b commit 5a5440b

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lib/proto/proto_handshake.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ handshakedone(struct handshake_cookie * H)
293293
/* Perform the final computation. */
294294
if (proto_crypt_mkkeys(H->K, H->nonce_local, H->nonce_remote,
295295
H->yh_remote, H->x, H->nopfs, H->decr, &c, &s))
296-
goto err0;
296+
return (handshakefail(H));
297297

298298
/* Perform the callback. */
299299
rc = (H->callback)(H->cookie, c, s);
@@ -303,10 +303,6 @@ handshakedone(struct handshake_cookie * H)
303303

304304
/* Return status code from callback. */
305305
return (rc);
306-
307-
err0:
308-
/* Failure! */
309-
return (-1);
310306
}
311307

312308
/**

0 commit comments

Comments
 (0)