Skip to content

Commit

Permalink
Fix strncmp invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Jun 7, 2024
1 parent 4a6553e commit 0ac6143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/unix/openssl_platform_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,8 @@ static void s_validate_libcrypto_linkage(void) {
AWS_FATAL_ASSERT(strstr("AWS-LC", runtime_version) == NULL);
/* Validate both expected and runtime versions begin with OpenSSL's version str prefix. */
const char *openssl_prefix = "OpenSSL ";
AWS_FATAL_ASSERT(strncmp(openssl_prefix, expected_version) == 0);
AWS_FATAL_ASSERT(strncmp(openssl_prefix, runtime_version) == 0);
AWS_FATAL_ASSERT(strncmp(openssl_prefix, expected_version, strlen(openssl_prefix)) == 0);
AWS_FATAL_ASSERT(strncmp(openssl_prefix, runtime_version, strlen(openssl_prefix)) == 0);
#else
AWS_FATAL_ASSERT(strcmp(expected_version, runtime_version) == 0 && "libcrypto mislink");
#endif
Expand Down

0 comments on commit 0ac6143

Please sign in to comment.