From: Nick Mathewson Date: Fri, 29 Jun 2018 17:06:15 +0000 (-0400) Subject: Merge branch 'maint-0.3.1' into maint-0.3.2 X-Git-Tag: tor-0.3.2.11~10^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68dfbd5ef433b830059baa08d48589518db05d22;p=thirdparty%2Ftor.git Merge branch 'maint-0.3.1' into maint-0.3.2 --- 68dfbd5ef433b830059baa08d48589518db05d22 diff --cc src/or/hs_descriptor.c index fef0607c1d,8e10c0fff8..582ac9cb7c --- a/src/or/hs_descriptor.c +++ b/src/or/hs_descriptor.c @@@ -1115,16 -1133,8 +1115,17 @@@ decode_link_specifiers(const char *enco memcpy(hs_spec->u.legacy_id, link_specifier_getarray_un_legacy_id(ls), sizeof(hs_spec->u.legacy_id)); break; + case LS_ED25519_ID: + /* Both are known at compile time so let's make sure they are the same + * else we can copy memory out of bound. */ + tor_assert(link_specifier_getlen_un_ed25519_id(ls) == + sizeof(hs_spec->u.ed25519_id)); + memcpy(hs_spec->u.ed25519_id, + link_specifier_getconstarray_un_ed25519_id(ls), + sizeof(hs_spec->u.ed25519_id)); + break; default: + tor_free(hs_spec); goto err; }