Name: mf23781 Date: 12/04/97
****** DEFECT 3929 *****************************************************
In src/unix/java/jre/jre_md.c, there's a function called
SetLibraryPath, which contains a typo:
/*
* Sets LIBPATH to include the specified directory.
*/
void
SetLibraryPath(const char *dir)
{
char *s = getenv("LIBPATH"), *buf;
/* Set library path */
if (s == 0) {
sprintf(buf, "LIBPATH=%s:%s", dir, s);
} else {
buf = JRE_Malloc(strlen(dir) + 32);
sprintf(buf, "LIBPATH=%s", dir);
}
if (putenv(buf) != 0) {
perror("putenv");
exit(1);
}
}
It should say "if (s != 0) {".
"s == 0" makes it so that if you set library paths in the jre,
they are ignored.
======================================================================
****** DEFECT 3929 *****************************************************
In src/unix/java/jre/jre_md.c, there's a function called
SetLibraryPath, which contains a typo:
/*
* Sets LIBPATH to include the specified directory.
*/
void
SetLibraryPath(const char *dir)
{
char *s = getenv("LIBPATH"), *buf;
/* Set library path */
if (s == 0) {
sprintf(buf, "LIBPATH=%s:%s", dir, s);
} else {
buf = JRE_Malloc(strlen(dir) + 32);
sprintf(buf, "LIBPATH=%s", dir);
}
if (putenv(buf) != 0) {
perror("putenv");
exit(1);
}
}
It should say "if (s != 0) {".
"s == 0" makes it so that if you set library paths in the jre,
they are ignored.
======================================================================
- duplicates
-
JDK-4070266 SetLibraryPath() deals with LD_LIBRARY_PATH incorrectly
- Closed