fix buffer overflow in test_hex
This commit is contained in:
+2
-2
@@ -15,7 +15,7 @@ END_TEST
|
||||
|
||||
START_TEST (test_uc_hex_encode_2)
|
||||
uint8_t binary[] = {127, 128, 129};
|
||||
char hex[4] = "";
|
||||
char hex[sizeof binary * 2 + 1] = "";
|
||||
|
||||
uc_hex_encode(binary, sizeof binary, hex);
|
||||
|
||||
@@ -25,7 +25,7 @@ END_TEST
|
||||
|
||||
START_TEST (test_uc_hex_encode_3)
|
||||
uint8_t binary[] = {0, 1, 9, 11};
|
||||
char hex[5] = "";
|
||||
char hex[sizeof binary * 2 + 1] = "";
|
||||
|
||||
uc_hex_encode(binary, sizeof binary, hex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user