8259843: initialize dli_fname array before calling dll_address_to_library_name

Reviewed-by: lucy, dholmes
This commit is contained in:
Matthias Baesken 2021-01-20 15:08:02 +00:00
parent 52ed2aab9b
commit 69f90b5fd4
4 changed files with 11 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1557,6 +1557,7 @@ void os::jvm_path(char *buf, jint buflen) {
}
char dli_fname[MAXPATHLEN];
dli_fname[0] = '\0';
bool ret = dll_address_to_library_name(
CAST_FROM_FN_PTR(address, os::jvm_path),
dli_fname, sizeof(dli_fname), NULL);