Skip to content

Commit 91b63ca

Browse files
author
SendaoYan
committedJan 14, 2025
8345016: [ASAN] java.c reported ‘%s’ directive argument is null [-Werror=format-truncation=]
Reviewed-by: rriggs
1 parent 379d05b commit 91b63ca

File tree

1 file changed

+2
-0
lines changed
  • src/java.base/share/native/libjli

1 file changed

+2
-0
lines changed
 

‎src/java.base/share/native/libjli/java.c

+2
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,8 @@ SetClassPath(const char *s)
10181018
if (s == NULL)
10191019
return;
10201020
s = JLI_WildcardExpandClasspath(s);
1021+
if (s == NULL)
1022+
return;
10211023
if (sizeof(format) - 2 + JLI_StrLen(s) < JLI_StrLen(s))
10221024
// s is became corrupted after expanding wildcards
10231025
return;

0 commit comments

Comments
 (0)