1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/unittests/tests-base64: enlarge test buffer for worst case

This commit is contained in:
Kaspar Schleiser 2021-11-29 13:05:31 +01:00
parent 45add49342
commit a4575507c1

View File

@ -414,7 +414,11 @@ static void test_base64_11_urlsafe_encode_int(void)
unsigned char expected_encoding[] = "-RAAAA";
size_t base64_out_size = 0;
char base64_out[sizeof(expected_encoding)];
/* Up to two = signs are suppressed in urlsafe encoding at the end, but
* still written in the implementation. Just allocate 2 bytes more as worst
* case */
char base64_out[sizeof(expected_encoding) + 2];
/*
* @Note: