git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitfa44962db910f362c0df0da5b8103d87e2d8ce92 authorFarid Zakaria <fmzakari@google.com> dateTue 1 Jun 2021, 20:14 (5 years ago) parentdaf4b5e
1 file changed+1−1
pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch+1−1
pkgs/development/compilers/openjdk/fix-library-path-jdk8.patch+1−1
@@ -24,7 +24,7 @@ index c477851c1b..ff5e28d95b 100644
2424 sizeof(SYS_EXT_DIR) + sizeof("/lib/") + strlen(cpu_arch) + sizeof(DEFAULT_LIBPATH) + 1,
2525 mtInternal);
2626- sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib/%s:" DEFAULT_LIBPATH, v, v_colon, cpu_arch);
27−+ sprintf(ld_library_path, "%s%s", v);
27++ sprintf(ld_library_path, "%s", v);
2828 Arguments::set_library_path(ld_library_path);
2929 FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal);
3030 }