diff options
Diffstat (limited to 'src/trunnel/ed25519_cert.c')
-rw-r--r-- | src/trunnel/ed25519_cert.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/trunnel/ed25519_cert.c b/src/trunnel/ed25519_cert.c index f495743667..24988d510b 100644 --- a/src/trunnel/ed25519_cert.c +++ b/src/trunnel/ed25519_cert.c @@ -1,4 +1,4 @@ -/* ed25519_cert.c -- generated by Trunnel v1.4.4. +/* ed25519_cert.c -- generated by Trunnel v1.4.6. * https://gitweb.torproject.org/trunnel.git * You probably shouldn't edit this file. */ @@ -157,7 +157,7 @@ ed25519_cert_extension_setlen_un_unparsed(ed25519_cert_extension_t *inp, size_t &inp->un_unparsed.n_, inp->un_unparsed.elts_, newlen, sizeof(inp->un_unparsed.elts_[0]), (trunnel_free_fn_t) NULL, &inp->trunnel_error_code_); - if (newptr == NULL) + if (newlen != 0 && newptr == NULL) goto trunnel_alloc_failed; inp->un_unparsed.elts_ = newptr; return 0; @@ -589,7 +589,7 @@ ed25519_cert_setlen_ext(ed25519_cert_t *inp, size_t newlen) &inp->ext.n_, inp->ext.elts_, newlen, sizeof(inp->ext.elts_[0]), (trunnel_free_fn_t) ed25519_cert_extension_free, &inp->trunnel_error_code_); - if (newptr == NULL) + if (newlen != 0 && newptr == NULL) goto trunnel_alloc_failed; inp->ext.elts_ = newptr; return 0; |