aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ilavsky <ilavsky.martin@gmail.com>2021-09-11 20:38:50 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2021-09-12 12:11:53 +0000
commitd557edd568b5e127b6f8eefad4ba071c3aa123f9 (patch)
tree012033a5ccb9c361db3ece2995111337e654501c
parent2a060a40d54da7f4a75396478ae4c55aa17c36a1 (diff)
downloadports-d557edd568b5e127b6f8eefad4ba071c3aa123f9.tar.gz
ports-d557edd568b5e127b6f8eefad4ba071c3aa123f9.zip
emulators/virtualbox-ose-additions: Assign default value to pointer
In the virtualbox virtual filesystem code we ship as a patch some code in an else block is commented out. This produces a code path in which a pointer variable is dereferenced in an unassigned state, causing random crashes. Lacking a better fix, give a default value of NULL to the pointer, which at least avoids the random pointer dereference issue. PR: 255386 (cherry picked from commit 1b2394551c038558810be8bf396462174db334be)
-rw-r--r--emulators/virtualbox-ose-additions/Makefile1
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile
index 5d5e6dd75c50..f5350e92c5b2 100644
--- a/emulators/virtualbox-ose-additions/Makefile
+++ b/emulators/virtualbox-ose-additions/Makefile
@@ -2,6 +2,7 @@
PORTNAME= virtualbox-ose
PORTVERSION= 6.1.22
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= https://download.virtualbox.org/virtualbox/${PORTVERSION}/
PKGNAMESUFFIX?= -additions
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
index 99893d2f750e..904c251395dd 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
@@ -1,4 +1,4 @@
---- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig 2021-01-07 15:34:22 UTC
+--- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig 2021-07-28 16:16:27 UTC
+++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
@@ -14,228 +14,1350 @@
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
@@ -1119,7 +1119,7 @@
+ struct vnode *vp = ap->a_vp;
+ struct uio *uio = ap->a_uio;
+ struct vboxfs_node *dir = VP_TO_VBOXFS_NODE(vp);
-+ struct vboxfs_node *node;
++ struct vboxfs_node *node = NULL;
+ struct sffs_dirent *dirent = NULL;
+ sffs_dirents_t *cur_buf;
+ off_t offset = 0;