summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-05-20 11:18:30 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-05-20 11:22:33 +0100
commit81ce94f8dc4ed4dd6d7ed7f53734f9355aed3ce5 (patch)
tree697bdcee4da5397c8b50538899e031c411e4f608 /ssl
parentfeaa3b380bccfb79434896f5415c4b77d9515acd (diff)
For portability use BUF_strndup instead of strndup.
(cherry picked from commit dcca7b13e9066443237dd3001ae52fd103151c98)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/heartbeat_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/heartbeat_test.c b/ssl/heartbeat_test.c
index 76496c8b46..26a01c0804 100644
--- a/ssl/heartbeat_test.c
+++ b/ssl/heartbeat_test.c
@@ -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)