aboutsummaryrefslogtreecommitdiffstats
path: root/java/jdk16/files/patch-native::util.c
blob: 719d1ae0e989f7b4923a8bdd6bf35a732abd9e5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 */