mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-11-18 01:36:34 +00:00
In mbedtls_mpi_read_string, if the string is empty, return an empty bignum rather than a bignum with one limb with the value 0. Both representations are correct, so this is not, in principle, a user-visible change. The change does leak however through mbedtls_mpi_write_string in base 16 (but not in other bases), as it writes a bignum with 0 limbs as "" but a bignum with the value 0 and at least one limb as "00". This change makes it possible to construct an empty bignum through mbedtls_mpi_read_string, which is especially useful to construct test cases (a common use of mbedtls_mpi_read_string, as most formats use in production encode numbers in binary, to be read with mbedtls_mpi_read_binary or mbedtls_mpi_read_binary_le). 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 | ||