git: 1b2394551c03 - main - emulators/virtualbox-ose-additions: Assign default value to pointer
Guido Falsi
madpilot at FreeBSD.org
Sat Sep 11 20:41:18 UTC 2021
The branch main has been updated by madpilot:
URL: https://cgit.FreeBSD.org/ports/commit/?id=1b2394551c038558810be8bf396462174db334be
commit 1b2394551c038558810be8bf396462174db334be
Author: Martin Ilavsky <ilavsky.martin at gmail.com>
AuthorDate: 2021-09-11 20:38:50 +0000
Commit: Guido Falsi <madpilot at FreeBSD.org>
CommitDate: 2021-09-11 20:38:50 +0000
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
---
emulators/virtualbox-ose-additions/Makefile | 1 +
.../files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c | 4 ++--
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;
More information about the dev-commits-ports-all
mailing list