Searched hist:b85bcb8ec92126c238572ed7d242115125e411e1 (Results 1 – 2 of 2) sorted by relevance
| /rk3399_ARM-atf/include/lib/psa/ |
| H A D | measured_boot.h | b85bcb8ec92126c238572ed7d242115125e411e1 Mon Mar 20 14:00:30 UTC 2023 Jimmy Brisson <jimmy.brisson@arm.com> fix(measured-boot): don't strip last non-0 char
With the current implementation of stripping the last null byte from a string, there was no way to get the TF-M measured boot test suite to pass. It would expect the size of the string passed into extend measurement to be unaffected by the call.
This fix should allow passing a string with the null char pre-stripped, allowing the tests to exclude the null char in their test data and not have the length decremented.
Further, This patch adds an early exit if either the version or sw_type is larger than its buffer. Without this check, it may be possible to pass a length one more than the maximum, and if the last element is a null, the length will be truncated to fit. This is instead suppsed to return an error.
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com> Change-Id: I98e1bb53345574d4645513009883c6e7b6612531
|
| /rk3399_ARM-atf/lib/psa/ |
| H A D | measured_boot.c | b85bcb8ec92126c238572ed7d242115125e411e1 Mon Mar 20 14:00:30 UTC 2023 Jimmy Brisson <jimmy.brisson@arm.com> fix(measured-boot): don't strip last non-0 char
With the current implementation of stripping the last null byte from a string, there was no way to get the TF-M measured boot test suite to pass. It would expect the size of the string passed into extend measurement to be unaffected by the call.
This fix should allow passing a string with the null char pre-stripped, allowing the tests to exclude the null char in their test data and not have the length decremented.
Further, This patch adds an early exit if either the version or sw_type is larger than its buffer. Without this check, it may be possible to pass a length one more than the maximum, and if the last element is a null, the length will be truncated to fit. This is instead suppsed to return an error.
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com> Change-Id: I98e1bb53345574d4645513009883c6e7b6612531
|