aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-07-15 14:35:25 +0800
committergreen <green@FreeBSD.org>2000-07-15 14:35:25 +0800
commit015d6375be718fc8999080decdbddea1632802f7 (patch)
treef717d061268ad342503fffd8360c9bff11c9c7f9 /security
parent96988a0d99403181e5fcfaa28a924bb375799bbb (diff)
downloadfreebsd-ports-gnome-015d6375be718fc8999080decdbddea1632802f7.tar.gz
freebsd-ports-gnome-015d6375be718fc8999080decdbddea1632802f7.tar.zst
freebsd-ports-gnome-015d6375be718fc8999080decdbddea1632802f7.zip
Strategically change a couple malloc() calls to calloc() calls so that
every request doesn't return NFSERR_STALE. This CFS bug brought to light by the letters p, h, and k :)
Diffstat (limited to 'security')
-rw-r--r--security/cfs/files/patch-af20
1 files changed, 20 insertions, 0 deletions
diff --git a/security/cfs/files/patch-af b/security/cfs/files/patch-af
new file mode 100644
index 000000000000..c9d3edc2d1da
--- /dev/null
+++ b/security/cfs/files/patch-af
@@ -0,0 +1,20 @@
+--- cfs_fh.c.orig Sat Jul 15 01:26:30 2000
++++ cfs_fh.c Sat Jul 15 01:24:02 2000
+@@ -908,7 +908,7 @@
+ f->name=NULL;
+ }
+ } else {
+- if ((f=(cfs_fileid *)malloc(sizeof(cfs_fileid)))==NULL) {
++ if ((f=(cfs_fileid *)calloc(1, sizeof(cfs_fileid)))==NULL) {
+ fprintf(stderr,"cfsd: out of memory\n");
+ cfserrno=NFSERR_STALE; /* bad news */
+ return -2;
+@@ -1198,7 +1198,7 @@
+ #endif /* SHORTLINKS */
+ )) == NULL) {
+ if ((f=(cfs_fileid *)
+- malloc(sizeof(cfs_fileid)))==NULL) {
++ calloc(1, sizeof(cfs_fileid)))==NULL) {
+ fprintf(stderr,"cfsd: no memory\n");
+ cfserrno=NFSERR_STALE; /* bad news */
+ return -2;