1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00

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.
This commit is contained in:
Farid Zakaria 2021-06-01 20:14:20 -07:00
parent daf4b5e54a
commit fa44962db9

View file

@ -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);
}