Skip to content
Snippets Groups Projects
Commit 26dd4d92 authored by Taylor Yu's avatar Taylor Yu
Browse files

Remove SR_COMMIT_LEN workaround

Now that base64_decode() checks the destination buffer length against
the actual number of bytes as they're produced, shared_random.c no
longer needs the "SR_COMMIT_LEN+2" workaround.
parent 2b38bb28
No related branches found
No related tags found
No related merge requests found
......@@ -230,9 +230,7 @@ commit_decode(const char *encoded, sr_commit_t *commit)
{
int decoded_len = 0;
size_t offset = 0;
/* XXX: Needs two extra bytes for the base64 decode calculation matches
* the binary length once decoded. #17868. */
char b64_decoded[SR_COMMIT_LEN + 2];
char b64_decoded[SR_COMMIT_LEN];
tor_assert(encoded);
tor_assert(commit);
......@@ -284,9 +282,7 @@ STATIC int
reveal_decode(const char *encoded, sr_commit_t *commit)
{
int decoded_len = 0;
/* XXX: Needs two extra bytes for the base64 decode calculation matches
* the binary length once decoded. #17868. */
char b64_decoded[SR_REVEAL_LEN + 2];
char b64_decoded[SR_REVEAL_LEN];
tor_assert(encoded);
tor_assert(commit);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment