aboutsummaryrefslogtreecommitdiff
path: root/src/trunnel/ed25519_cert.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-02-22 14:19:29 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-22 14:19:29 -0500
commita508119169388fbef84204cb7f8e25b84823b71e (patch)
treede5c08e1c2f0f0f23b6108a8ddafb4cb7509b2f6 /src/trunnel/ed25519_cert.c
parent2240aa1269b0b72bff678eaa3f144f8ebb3d3931 (diff)
downloadtor-a508119169388fbef84204cb7f8e25b84823b71e.tar.gz
tor-a508119169388fbef84204cb7f8e25b84823b71e.zip
Update to trunnel 1.4.4 to fix 18373
Diffstat (limited to 'src/trunnel/ed25519_cert.c')
-rw-r--r--src/trunnel/ed25519_cert.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/trunnel/ed25519_cert.c b/src/trunnel/ed25519_cert.c
index ee010dbff9..f495743667 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.3.
+/* ed25519_cert.c -- generated by Trunnel v1.4.4.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@@ -289,7 +289,8 @@ ed25519_cert_extension_encode(uint8_t *output, const size_t avail, const ed25519
trunnel_assert(written <= avail);
if (avail - written < elt_len)
goto truncated;
- memcpy(ptr, obj->un_unparsed.elts_, elt_len);
+ if (elt_len)
+ memcpy(ptr, obj->un_unparsed.elts_, elt_len);
written += elt_len; ptr += elt_len;
}
break;
@@ -374,7 +375,8 @@ ed25519_cert_extension_parse_into(ed25519_cert_extension_t *obj, const uint8_t *
/* Parse u8 un_unparsed[] */
TRUNNEL_DYNARRAY_EXPAND(uint8_t, &obj->un_unparsed, remaining, {});
obj->un_unparsed.n_ = remaining;
- memcpy(obj->un_unparsed.elts_, ptr, remaining);
+ if (remaining)
+ memcpy(obj->un_unparsed.elts_, ptr, remaining);
ptr += remaining; remaining -= remaining;
break;
}