mbedtls/tests
Gilles Peskine 42a1acfd0e get_len_step: Fix end-of-buffer calculation when buffer_size==0
Fix get_len_step when buffer_size==0. The intent of this test is to
ensure (via static or runtime buffer overflow analysis) that
mbedtls_asn1_get_len does not attempt to access beyond the end of the
buffer. When buffer_size is 0 (reached from get_len when parsing a
1-byte buffer), the buffer is buf[1..1] because allocating a 0-byte
buffer might yield a null pointer rather than a valid pointer. In this
case the end of the buffer is p==buf+1, not buf+buffer_size which is
buf+0.

The test passed because calling mbedtls_asn1_get_len(&p,end,...) with
end < p happens to work, but this is not guaranteed.
2020-01-21 16:12:07 +01:00
..
.jenkins
configs Add a test component with malloc(0) returning NULL 2019-09-24 18:28:26 +02:00
data_files Remove unused test data file 2019-11-14 19:14:40 +01:00
docker/bionic
git-scripts
scripts Merge pull request #334 from dgreen-arm/fix-pylint-warnings 2019-12-20 16:06:53 +00:00
suites get_len_step: Fix end-of-buffer calculation when buffer_size==0 2020-01-21 16:12:07 +01:00
.gitignore PSA return status coverage script 2019-09-06 19:28:47 +02:00
CMakeLists.txt cmake: update interpreter requirement for the test suite generator 2019-11-13 14:33:34 +00:00
Descriptions.txt
make-in-docker.sh
Makefile Makefiles: move the dependencies block to be after DLEXT definition 2019-10-07 09:24:22 -04:00
psa_crypto_helpers.h PSA return status coverage script 2019-09-06 19:28:47 +02:00
psa_helpers.h