git: e6728be27592 - main - multimedia/linux_dvbwrapper: Add error handling for copyout() calls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 Jan 2024 01:00:58 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/ports/commit/?id=e6728be27592820616fb830006265b973d1764d1 commit e6728be27592820616fb830006265b973d1764d1 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-01-02 18:21:22 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-01-03 01:00:31 +0000 multimedia/linux_dvbwrapper: Add error handling for copyout() calls The base system will soon require all copyout() calls to have explicit handling of return values. PR: 275986 Approved by: antoine --- multimedia/linux_dvbwrapper-kmod/Makefile | 2 +- .../files/patch-linux__dvbwrapper.c | 31 ++++++++++++++++++---- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/multimedia/linux_dvbwrapper-kmod/Makefile b/multimedia/linux_dvbwrapper-kmod/Makefile index d0259b063fbc..6e9aac435155 100644 --- a/multimedia/linux_dvbwrapper-kmod/Makefile +++ b/multimedia/linux_dvbwrapper-kmod/Makefile @@ -1,6 +1,6 @@ PORTNAME= linux_dvbwrapper-kmod PORTVERSION= 1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia DISTFILES= # none diff --git a/multimedia/linux_dvbwrapper-kmod/files/patch-linux__dvbwrapper.c b/multimedia/linux_dvbwrapper-kmod/files/patch-linux__dvbwrapper.c index fa16b8afa9f6..5c36be1ffd28 100644 --- a/multimedia/linux_dvbwrapper-kmod/files/patch-linux__dvbwrapper.c +++ b/multimedia/linux_dvbwrapper-kmod/files/patch-linux__dvbwrapper.c @@ -1,14 +1,35 @@ ---- linux_dvbwrapper.c.orig 2017-02-01 19:40:17 UTC +--- linux_dvbwrapper.c.orig 2024-01-02 18:20:10 UTC +++ linux_dvbwrapper.c -@@ -38,10 +38,7 @@ __FBSDID("$FreeBSD$"); +@@ -37,11 +37,8 @@ #include <sys/sysproto.h> #include <sys/mman.h> #include <sys/resourcevar.h> -- ++#include <sys/capsicum.h> + -#if __FreeBSD_version > 900040 -#include <sys/capability.h> -#endif -+#include <sys/capsicum.h> - +- #include <vm/vm.h> #include <vm/pmap.h> + #include <vm/vm_extern.h> +@@ -299,7 +296,9 @@ linux_ioctl_dvb(struct thread *td, struct linux_ioctl_ + error = copyout_map(td, &uvp, propsiz); + if (error) + goto out2; +- copyout(vp, (void *)uvp, propsiz); ++ error = copyout(vp, (void *)uvp, propsiz); ++ if (error) ++ goto out2; + + #if __FreeBSD_version > 1000051 + error = fget(td, args->fd, +@@ -330,7 +329,7 @@ linux_ioctl_dvb(struct thread *td, struct linux_ioctl_ + for (i = vps.num, l_p = l_vp, p = vp; i--; ++l_p, ++p) + bsd_to_linux_dtv_property(p, l_p); + linux_to_bsd_dtv_properties(&l_vps, &vps); +- copyout(l_vp, (void *)vps.props, l_propsiz); ++ error = copyout(l_vp, (void *)vps.props, l_propsiz); + + out: + fdrop(fp, td);