mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-24 01:05:41 +00:00
9189202156
The test function generate_random allocated a few extra bytes after the expected output and checked that these extra bytes were not overwritten. Memory sanity checks such as AddressSanitizer and Valgrind already detect this kind of buffer overflow, so having this test in our code was actually redundant. Remove it. This has the benefit of not triggering a build error with GCC (observed with 7.5.0 and 9.3.0) when ASan+UBSan is enabled: with the previous code using trail, GCC complained about an excessively large value passed to calloc(), which was (size_t)(-sizeof(trail)). Thus this commit fixes #4122. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
||
---|---|---|
.. | ||
.jenkins | ||
configs | ||
data_files | ||
docker/bionic | ||
git-scripts | ||
include/test | ||
scripts | ||
src | ||
suites | ||
.gitignore | ||
CMakeLists.txt | ||
compat-in-docker.sh | ||
compat.sh | ||
context-info.sh | ||
Descriptions.txt | ||
make-in-docker.sh | ||
Makefile | ||
ssl-opt-in-docker.sh | ||
ssl-opt.sh |