commit | 78ec4e988a49e7f2756760a4cd0a2a0f815f1b8f | [log] [tgz] |
---|---|---|
author | Ricardo Salveti <ricardo@foundries.io> | Wed Jun 26 17:32:11 2019 -0300 |
committer | Jerome Forissier <jerome.forissier@linaro.org> | Fri Jun 28 13:37:55 2019 +0200 |
tree | f65bcef5ea9fb06c9e442cf1e3b2b0d69dbaef82 | |
parent | 6987a82dd8d764e65708f9443d34fce08f94526b [diff] |
regression_8100: use null terminated strings with file_to_c GCC 9 is more strict with string manipulation, causing the build to fail as the string data converted via file_to_c is not null terminated, as described by the following build error: regression_8100.c:100:29: error: '%*s' directive argument is not a nul-terminated string [-Werror=format-overflow=] tlen = myasprintf(&trust, "%*s", (int)sizeof(regression_8100_ca_crt), ^~~ regression_8100_ca_crt); ~~~~~~~~~~~~~~~~~~~~~~ Change file_to_c to terminate the string after conversion and update the string size to remove the null terminated byte. Also update regression_8100 to use the size variable defined via file_to_c instead of manually calling sizeof. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
This git contains source code for the test suite (xtest) used to test the OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.
// OP-TEE core maintainers