summaryrefslogtreecommitdiff
path: root/src/trunnel/pwbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/trunnel/pwbox.c')
-rw-r--r--src/trunnel/pwbox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/trunnel/pwbox.c b/src/trunnel/pwbox.c
index 9b348a9b30..62662a9369 100644
--- a/src/trunnel/pwbox.c
+++ b/src/trunnel/pwbox.c
@@ -1,4 +1,4 @@
-/* pwbox.c -- generated by Trunnel v1.4.4.
+/* pwbox.c -- generated by Trunnel v1.4.6.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@@ -151,7 +151,7 @@ pwbox_encoded_setlen_skey_header(pwbox_encoded_t *inp, size_t newlen)
&inp->skey_header.n_, inp->skey_header.elts_, newlen,
sizeof(inp->skey_header.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
- if (newptr == NULL)
+ if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->skey_header.elts_ = newptr;
return 0;
@@ -226,7 +226,7 @@ pwbox_encoded_setlen_data(pwbox_encoded_t *inp, size_t newlen)
&inp->data.n_, inp->data.elts_, newlen,
sizeof(inp->data.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
- if (newptr == NULL)
+ if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->data.elts_ = newptr;
return 0;