aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2004-01-17 15:11:12 +0800
committerglewis <glewis@FreeBSD.org>2004-01-17 15:11:12 +0800
commit9f814904b2866fe54d6d487306611c4973258272 (patch)
tree5f4138a5e83dcd7f866a495229a159f42e30bed0 /java
parent722057c008a14bf8b190777c7a371802e72ac570 (diff)
downloadfreebsd-ports-gnome-9f814904b2866fe54d6d487306611c4973258272.tar.gz
freebsd-ports-gnome-9f814904b2866fe54d6d487306611c4973258272.tar.zst
freebsd-ports-gnome-9f814904b2866fe54d6d487306611c4973258272.zip
. Check the return value of stat(2) when trying to read the javaws
configuration file and behave appropriately if its -1. Fixes a SEGV caused by ignoring the return value and just carrying on. . Bump PORTREVISION. PR: 61392
Diffstat (limited to 'java')
-rw-r--r--java/jdk14/Makefile1
-rw-r--r--java/jdk14/files/patch-native::util.c16
-rw-r--r--java/jdk15/Makefile1
-rw-r--r--java/jdk15/files/patch-native::util.c16
-rw-r--r--java/jdk16/Makefile1
-rw-r--r--java/jdk16/files/patch-native::util.c16
6 files changed, 51 insertions, 0 deletions
diff --git a/java/jdk14/Makefile b/java/jdk14/Makefile
index a89138f56b27..6c90be937a12 100644
--- a/java/jdk14/Makefile
+++ b/java/jdk14/Makefile
@@ -7,6 +7,7 @@
PORTNAME= jdk
PORTVERSION= ${JDK_VERSION}p${JDK_PATCHSET_VERSION}
+PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= # http://www.sun.com/software/java2/download.html
# http://www.eyesbeyond.com/freebsddom/java/jdk14.html
diff --git a/java/jdk14/files/patch-native::util.c b/java/jdk14/files/patch-native::util.c
new file mode 100644
index 000000000000..719d1ae0e989
--- /dev/null
+++ b/java/jdk14/files/patch-native::util.c
@@ -0,0 +1,16 @@
+$FreeBSD$
+
+--- ../../deploy/src/javaws/src/share/native/util.c 22 Oct 2003 23:04:17 -0000 1.1.1.1
++++ ../../deploy/src/javaws/src/share/native/util.c 16 Jan 2004 23:50:11 -0000
+@@ -27,7 +27,10 @@
+
+ /* Find size of file */
+ struct stat statBuf;
+- stat(filename, &statBuf);
++ if (stat(filename, &statBuf) == -1) {
++ *buffer = NULL;
++ return 0;
++ }
+ size = statBuf.st_size;
+
+ /* Allocate memory for contents */
diff --git a/java/jdk15/Makefile b/java/jdk15/Makefile
index a89138f56b27..6c90be937a12 100644
--- a/java/jdk15/Makefile
+++ b/java/jdk15/Makefile
@@ -7,6 +7,7 @@
PORTNAME= jdk
PORTVERSION= ${JDK_VERSION}p${JDK_PATCHSET_VERSION}
+PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= # http://www.sun.com/software/java2/download.html
# http://www.eyesbeyond.com/freebsddom/java/jdk14.html
diff --git a/java/jdk15/files/patch-native::util.c b/java/jdk15/files/patch-native::util.c
new file mode 100644
index 000000000000..719d1ae0e989
--- /dev/null
+++ b/java/jdk15/files/patch-native::util.c
@@ -0,0 +1,16 @@
+$FreeBSD$
+
+--- ../../deploy/src/javaws/src/share/native/util.c 22 Oct 2003 23:04:17 -0000 1.1.1.1
++++ ../../deploy/src/javaws/src/share/native/util.c 16 Jan 2004 23:50:11 -0000
+@@ -27,7 +27,10 @@
+
+ /* Find size of file */
+ struct stat statBuf;
+- stat(filename, &statBuf);
++ if (stat(filename, &statBuf) == -1) {
++ *buffer = NULL;
++ return 0;
++ }
+ size = statBuf.st_size;
+
+ /* Allocate memory for contents */
diff --git a/java/jdk16/Makefile b/java/jdk16/Makefile
index a89138f56b27..6c90be937a12 100644
--- a/java/jdk16/Makefile
+++ b/java/jdk16/Makefile
@@ -7,6 +7,7 @@
PORTNAME= jdk
PORTVERSION= ${JDK_VERSION}p${JDK_PATCHSET_VERSION}
+PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= # http://www.sun.com/software/java2/download.html
# http://www.eyesbeyond.com/freebsddom/java/jdk14.html
diff --git a/java/jdk16/files/patch-native::util.c b/java/jdk16/files/patch-native::util.c
new file mode 100644
index 000000000000..719d1ae0e989
--- /dev/null
+++ b/java/jdk16/files/patch-native::util.c
@@ -0,0 +1,16 @@
+$FreeBSD$
+
+--- ../../deploy/src/javaws/src/share/native/util.c 22 Oct 2003 23:04:17 -0000 1.1.1.1
++++ ../../deploy/src/javaws/src/share/native/util.c 16 Jan 2004 23:50:11 -0000
+@@ -27,7 +27,10 @@
+
+ /* Find size of file */
+ struct stat statBuf;
+- stat(filename, &statBuf);
++ if (stat(filename, &statBuf) == -1) {
++ *buffer = NULL;
++ return 0;
++ }
+ size = statBuf.st_size;
+
+ /* Allocate memory for contents */