mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-31 10:20:45 +00:00
test: properly check written PEM buffer len
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
232a006a46
commit
2280895784
@ -56,7 +56,7 @@ static void pk_write_check_common(char *key_file, int is_public_key, int is_der)
|
|||||||
start_buf = buf + check_buf_len - buf_len;
|
start_buf = buf + check_buf_len - buf_len;
|
||||||
} else {
|
} else {
|
||||||
TEST_EQUAL(ret, 0);
|
TEST_EQUAL(ret, 0);
|
||||||
buf_len = check_buf_len;
|
buf_len = strlen((char *) buf) + 1; /* +1 takes the string terminator into account */
|
||||||
start_buf = buf;
|
start_buf = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user