Demi Marie Obenour 6b8e8ff079 Fix segfault in mbedtls_oid_get_numeric_string
When passed an empty OID, mbedtls_oid_get_numeric_string would read one
byte from the zero-sized buffer and return an error code that depends on
its value.  This is demonstrated by the test suite changes, which
check that an OID with length zero and an invalid buffer pointer does
not cause Mbed TLS to segfault.

Also check that second and subsequent subidentifiers are terminated, and
add a test case for that.  Furthermore, stop relying on integer division
by 40, use the same loop for both the first and subsequent
subidentifiers, and add additional tests.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2023-03-16 01:07:35 -04:00
..
.jenkins Add a Jenkinsfile for PR job testing 2018-10-19 16:41:54 +01:00
configs Switch to the new code style 2023-01-11 14:52:35 +01:00
data_files Fix typo 'unsupoported' -> 'unsupported' 2022-11-25 15:54:07 +00:00
docker/bionic Point to docker images used in the CI 2022-12-16 10:21:11 +01:00
git-scripts Fix typographical errors in .md files found by cspell 2022-07-29 13:54:52 +01:00
include Use ASSERT_COMPARE in test_suite_md 2023-02-09 09:26:22 +01:00
scripts all.sh: add support function for build_armcc 2023-03-03 18:23:35 +08:00
src Fix a copy-paste error in define comment 2023-01-17 05:44:06 -05:00
suites Fix segfault in mbedtls_oid_get_numeric_string 2023-03-16 01:07:35 -04:00
.gitignore tests: Add build of a PSA test driver library 2021-11-30 14:49:19 +01:00
CMakeLists.txt Fix "make lcov" in CMake out-of-tree builds 2022-12-13 18:44:14 +01:00
compat-in-docker.sh Use OPENSSL everywhere, not OPENSSL_CMD 2023-01-10 09:47:09 +01:00
compat.sh Fix typo 2023-02-23 18:27:33 +08:00
context-info.sh Merge pull request #3614 from gilles-peskine-arm/ssl-opt-gnutls-printf-development 2020-11-04 17:55:42 +01: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 Point to docker images used in the CI 2022-12-16 10:21:11 +01:00
Makefile Add target to generated all .c (and .datax) files 2022-11-29 21:46:50 +01:00
ssl-opt-in-docker.sh Use OPENSSL everywhere, not OPENSSL_CMD 2023-01-10 09:47:09 +01:00
ssl-opt.sh Have compat.sh and ssl-opt.sh not return success for > 255 errors 2023-01-13 12:14:43 +00:00