Skip to content

Commit

Permalink
Address review comments 3
Browse files Browse the repository at this point in the history
  • Loading branch information
KostasTsiounis committed Dec 9, 2024
1 parent 6bef143 commit 50a7a54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions closed/src/java.base/share/native/libjncrypto/NativeCrypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,10 @@ find_crypto_library(jboolean traceEnabled, const char *chomepath)
#else /* defined(_WIN32) */
static const char pathSuffix[] = "/lib/";
#endif /* defined(_WIN32) */

size_t path_len = strlen(chomepath) + sizeof(pathSuffix) - 1;
char *libPath = malloc(path_len + 1);

if (NULL == libPath) {
if (traceEnabled) {
fprintf(stderr, "\tFailed to allocate memory for path.\n");
Expand Down

0 comments on commit 50a7a54

Please sign in to comment.