mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
For portability use BUF_strndup instead of strndup.
This commit is contained in:
parent
6db14dbc51
commit
dcca7b13e9
@ -236,7 +236,7 @@ static int execute_heartbeat(HEARTBEAT_TEST_FIXTURE fixture)
|
||||
}
|
||||
else
|
||||
{
|
||||
char* actual_payload = strndup((const char*)p, actual_payload_len);
|
||||
char* actual_payload = BUF_strndup((const char*)p, actual_payload_len);
|
||||
if (strcmp(actual_payload, fixture.expected_return_payload) != 0)
|
||||
{
|
||||
printf("%s failed:\n expected payload: \"%s\"\n received: \"%s\"\n",
|
||||
@ -244,7 +244,7 @@ static int execute_heartbeat(HEARTBEAT_TEST_FIXTURE fixture)
|
||||
actual_payload);
|
||||
result = 1;
|
||||
}
|
||||
free(actual_payload);
|
||||
OPENSSL_free(actual_payload);
|
||||
}
|
||||
|
||||
if (result != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user