aboutsummaryrefslogtreecommitdiff
path: root/src/trunnel/link_handshake.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/trunnel/link_handshake.c')
-rw-r--r--src/trunnel/link_handshake.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/trunnel/link_handshake.c b/src/trunnel/link_handshake.c
index 3ef7341ae9..c2717f36bf 100644
--- a/src/trunnel/link_handshake.c
+++ b/src/trunnel/link_handshake.c
@@ -1,4 +1,4 @@
-/* link_handshake.c -- generated by Trunnel v1.4.4.
+/* link_handshake.c -- generated by Trunnel v1.4.6.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@@ -143,7 +143,7 @@ auth_challenge_cell_setlen_methods(auth_challenge_cell_t *inp, size_t newlen)
&inp->methods.n_, inp->methods.elts_, newlen,
sizeof(inp->methods.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
- if (newptr == NULL)
+ if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->methods.elts_ = newptr;
return 0;
@@ -452,7 +452,7 @@ certs_cell_cert_setlen_body(certs_cell_cert_t *inp, size_t newlen)
&inp->body.n_, inp->body.elts_, newlen,
sizeof(inp->body.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
- if (newptr == NULL)
+ if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->body.elts_ = newptr;
return 0;
@@ -747,7 +747,7 @@ rsa_ed_crosscert_setlen_sig(rsa_ed_crosscert_t *inp, size_t newlen)
&inp->sig.n_, inp->sig.elts_, newlen,
sizeof(inp->sig.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
- if (newptr == NULL)
+ if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->sig.elts_ = newptr;
return 0;
@@ -1268,7 +1268,7 @@ auth1_setlen_sig(auth1_t *inp, size_t newlen)
&inp->sig.n_, inp->sig.elts_, newlen,
sizeof(inp->sig.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
- if (newptr == NULL)
+ if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->sig.elts_ = newptr;
return 0;
@@ -1714,7 +1714,7 @@ certs_cell_setlen_certs(certs_cell_t *inp, size_t newlen)
&inp->certs.n_, inp->certs.elts_, newlen,
sizeof(inp->certs.elts_[0]), (trunnel_free_fn_t) certs_cell_cert_free,
&inp->trunnel_error_code_);
- if (newptr == NULL)
+ if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->certs.elts_ = newptr;
return 0;