Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a761231b authored by Elliott Hughes's avatar Elliott Hughes Committed by Nick Kralevich
Browse files

Stop writing NUL bytes in adbkey.pub.

In N we moved some code from C to C++ without realizing that EVP_EncodedLength
includes space for a terminating NUL and EVP_EncodeBlock writes one. Because
our key reading code copes with the NUL, we never noticed.

Distinguish between the required space returned by EVP_EncodedLength and the
actual number of bytes (not including NUL) used return by EVP_EncodeBlock.

Bug: http://b/36187819
Test: hexdump of ~/.android/adbkey.pub

(cherry picked from commit 0b771b33)

Change-Id: I6e16b8d48d097b4054417c1d1a225bf7ece985b9
parent fde19425
Loading
Loading
Loading
Loading
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