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-11 20:38:50 +0000
commit1b2394551c038558810be8bf396462174db334be (patch)
tree0839069276e8a1a73f0071749aa447cacd690f62
parent67b637822a5602e343d3701f628f6a181ae4ce21 (diff)
downloadports-1b2394551c038558810be8bf396462174db334be.tar.gz
ports-1b2394551c038558810be8bf396462174db334be.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
-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 c4a98be98307..a049d0b9704a 100644
--- a/emulators/virtualbox-ose-additions/Makefile
+++ b/emulators/virtualbox-ose-additions/Makefile
@@ -2,6 +2,7 @@
PORTNAME= virtualbox-ose
PORTVERSION= 6.1.26
+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;