-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/crypto: fix vector global buffer overflow
When doing a memcpy of the test vector into a local union variable, the size of the union was used. This meant extra bytes were being copied from the test vector address in the case the vector was smaller in size than the union. This caused a global buffer overflow error detected by Address Sanitizer. To fix this, the size of the test vector is also stored alongside the address, so when copying takes place, the minimum of the union and test vector can be used as the size reference. Fixes: 488f5a2 ("test/crypto: check asymmetric crypto") Signed-off-by: Ciara Power <ciara.power@intel.com>
- Loading branch information
1 parent
49b2102
commit b40fd60
Showing
1 changed file
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters