summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-01-21 09:54:11 +0000
committerDamien Miller <djm@mindrot.org>2019-01-21 21:47:28 +1100
commit7be8572b32a15d5c3dba897f252e2e04e991c307 (patch)
tree449782dce059d2eb8d28aaa3baeaedd876b915a2 /packet.c
parent803178bd5da7e72be94ba5b4c4c196d4b542da4d (diff)
upstream: Make sshpkt_get_bignum2() allocate the bignum it is
parsing rather than make the caller do it. Saves a lot of boilerplate code. from markus@ ok djm@ OpenBSD-Commit-ID: 576bf784f9a240f5a1401f7005364e59aed3bce9
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/packet.c b/packet.c
index aa8be8c94..a162791b1 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.280 2019/01/19 21:33:14 djm Exp $ */ 1/* $OpenBSD: packet.c,v 1.281 2019/01/21 09:54:11 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2559,11 +2559,10 @@ sshpkt_get_ec(struct ssh *ssh, EC_POINT *v, const EC_GROUP *g)
2559} 2559}
2560#endif /* OPENSSL_HAS_ECC */ 2560#endif /* OPENSSL_HAS_ECC */
2561 2561
2562
2563int 2562int
2564sshpkt_get_bignum2(struct ssh *ssh, BIGNUM *v) 2563sshpkt_get_bignum2(struct ssh *ssh, BIGNUM **valp)
2565{ 2564{
2566 return sshbuf_get_bignum2(ssh->state->incoming_packet, v); 2565 return sshbuf_get_bignum2(ssh->state->incoming_packet, valp);
2567} 2566}
2568#endif /* WITH_OPENSSL */ 2567#endif /* WITH_OPENSSL */
2569 2568