mbedtls/tests
Paul Elliott 6a81eb6106 Remove Dangerous Parameter Passing
Another coverity bug - #350039

When this test discovers a key of the wrong type, it still throws it
through the export function in order to check that it too will detect
this as a not permitted action. For the buffer and buffer length
arguments it passes in a local pointer (which will most likely be NULL),
and the sizeof that pointer, as it knows that they will never be used.
Coverity rightly (imho) flagged this as suspicious - if we are going to
pass in incorrect parameters, at least make them obviously incorrect, and
ones that will not potentially cause errors if the code later changes.
There is, for example safety checks for zero length buffer, but less
protection for an insufficiently sized one.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2020-06-16 14:34:55 +01:00
..
.jenkins Add a Jenkinsfile for PR job testing 2018-10-19 16:41:54 +01:00
configs Add a test component with malloc(0) returning NULL 2020-02-11 19:26:28 +01:00
data_files Normalize line endings 2020-05-27 21:55:08 +02:00
docker/bionic Improve compatibility with firewalled networks 2019-06-29 17:45:34 -05:00
git-scripts Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
include/test tests: Add mbedtls_test_ prefix to rnd_* symbols 2020-06-12 14:33:08 +02:00
scripts Merge pull request #3363 from bensze01/zeroize 2020-06-10 11:31:38 +01:00
src tests: Add mbedtls_test_ prefix to rnd_* symbols 2020-06-12 14:33:08 +02:00
suites Remove Dangerous Parameter Passing 2020-06-16 14:34:55 +01:00
.gitignore tests: Add helpers.c and helpers.h files 2020-06-12 14:33:00 +02:00
CMakeLists.txt tests: Add helpers.c and helpers.h files 2020-06-12 14:33:00 +02:00
compat-in-docker.sh Clean up file prologue comments 2019-06-29 17:45:34 -05:00
compat.sh Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +01:00
context-info.sh Add tests for the ssl_context_info program 2020-04-15 16:21:36 +02:00
Descriptions.txt Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +01:00
make-in-docker.sh Clean up file prologue comments 2019-06-29 17:45:34 -05:00
Makefile tests: Add helpers.c and helpers.h files 2020-06-12 14:33:00 +02:00
ssl-opt-in-docker.sh Clean up file prologue comments 2019-06-29 17:45:34 -05:00
ssl-opt.sh Saving the serialized context to a file 2020-04-17 16:26:43 +02:00