From fa44962db910f362c0df0da5b8103d87e2d8ce92 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Tue, 1 Jun 2021 20:14:20 -0700 Subject: [PATCH] jdk8: fix sprintf patch This fixes a recent commit via #123708 The patch itself had an additional '%s' in the sprintf which is unsafe depending on the surrounding memory. --- pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch b/pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch index 0664e745f57f..3780e95ea5b6 100644 --- a/pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch +++ b/pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch @@ -24,7 +24,7 @@ index c477851c1b..ff5e28d95b 100644 sizeof(SYS_EXT_DIR) + sizeof("/lib/") + strlen(cpu_arch) + sizeof(DEFAULT_LIBPATH) + 1, mtInternal); - sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib/%s:" DEFAULT_LIBPATH, v, v_colon, cpu_arch); -+ sprintf(ld_library_path, "%s%s", v); ++ sprintf(ld_library_path, "%s", v); Arguments::set_library_path(ld_library_path); FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal); }