diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-25 11:38:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-25 11:38:24 -0400 |
commit | 6069c829f90576c04a0802d2a108378a2bbabb7a (patch) | |
tree | aaaf670a9e79384e0d83f5b8a04738636fef9566 /src/or/rendclient.c | |
parent | 10b242822490c9873138565bcc8a3565a7dc7014 (diff) | |
parent | 418f3d6298beb27e050618e2f59e01d6d3b2f45b (diff) | |
download | tor-6069c829f90576c04a0802d2a108378a2bbabb7a.tar.gz tor-6069c829f90576c04a0802d2a108378a2bbabb7a.zip |
Merge branch 'bug19418_029' into maint-0.3.1
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 9bc2d6289d..9e2daf0380 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -265,6 +265,11 @@ rend_client_send_introduction(origin_circuit_t *introcirc, klen = crypto_pk_asn1_encode(extend_info->onion_key, tmp+v3_shift+7+DIGEST_LEN+2, sizeof(tmp)-(v3_shift+7+DIGEST_LEN+2)); + if (klen < 0) { + log_warn(LD_BUG,"Internal error: can't encode public key."); + status = -2; + goto perm_err; + } set_uint16(tmp+v3_shift+7+DIGEST_LEN, htons(klen)); memcpy(tmp+v3_shift+7+DIGEST_LEN+2+klen, rendcirc->rend_data->rend_cookie, REND_COOKIE_LEN); |