diff options
author | Duncan Lowther <Duncan.Lowther@glasgow.ac.uk> | 2023-06-14 15:03:14 +0100 |
---|---|---|
committer | Duncan Lowther <Duncan.Lowther@glasgow.ac.uk> | 2023-06-21 09:48:11 +0100 |
commit | ae778363702a759e987bb9209165f5a413dbd8a9 (patch) | |
tree | ce3d73d5d9b093aaeb9cc64e59ee0425b69c744d /ports/esp32/esp32_ulp.c | |
parent | 25fb6515663f7541704d15068de280702e428042 (diff) |
extmod/modbinascii: Fix buffer length error.
The mod_binascii_a2b_base64() function allocates a buffer which may be
too small. It needs to be no less than three-quarters of the input
length, but is calculated as (<length> / 4) * 3 + 1, which may be less
due to integer division. Changed to (<length> * 3) / 4 + 1.
Signed-off-by: Duncan Lowther <Duncan.Lowther@glasgow.ac.uk>
Diffstat (limited to 'ports/esp32/esp32_ulp.c')
0 files changed, 0 insertions, 0 deletions