From nobody Wed Jan 3 01:00:55 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4WcS1mRrz56J8G; Wed, 3 Jan 2024 01:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4WcS1GD5z3dw5; Wed, 3 Jan 2024 01:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704243656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CnIctz2zOCRQHB0n458PTbyfe/GZXNzHfbeZGC7ve/o=; b=a+OSTRj2sFrjHYZhS9en6luHVdzBW+6PYXNxhFAdo/TEsRs/z/wvaYJzAsiyaZcY8Gn3/h uXcCIXRamhSRwnfcD57SbX75VL8XRjVEPzeTeqIzkY1zmSm3n9v6f+YCsgYJocc7lKFJv8 MJORqWLfWbc1AZz9G3Rbs7U3BkdYzyLeuUoh0x00eyovN1BEnjh96ViMzr2T/AidY4eoh7 Sb4OM34iQIpJP6seFTMmq17Fsg3PcwHhLLRxzxhmLxc4lQe/BIec+21aVJsc9YwGDpU+Yj zOGgBxEDd+nPDGUkcJosHIm8n2f/tb2tdqPIWFL9CPxFoJs4E/GVp2aH2j7IXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704243656; a=rsa-sha256; cv=none; b=OoUSZfHh7K06CPmzOjt/XeQHsEG5lMCt5ObjX9ygaNWVcRSkTMgrFYdCcScIepi4zEgJ3O YwxTtrzkJugJD1GfJcXY6y2+cDB25tZY6C/ET+6ql61390FjTUVPlqQWfNRsDzVu2yZ+0v Xnu9lLCjB/Xg2as+8uYObcEs+lCduH8aaabRjQvZQAZR+IdvafHfYGmQzz8OzufQ4Y3Up/ I67y7kmm9Z506l9EeoAjMPm48oW88RTNa8aVMT9BDC+trQjl1MliGkt8jkwEemgxzGRXiN oHpy3yMyJDmOESmrNQIAi/fwOHonRT3+qYk892vwguISma2WgusC62CT9zkWPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704243656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CnIctz2zOCRQHB0n458PTbyfe/GZXNzHfbeZGC7ve/o=; b=yUE+oklEXfiUauR2+6bqKXE3ha4ADWHApmWpeOki7PEFbhhE8iahe7UAbTXmkZuj2Fffdu 7eh8//yse8WrWoBTxLtbXKVdVN2ohxxtdv8bNr8VxGgrwoLQXoOMDBBHUBWwkmr4dCV+f9 tIPVPGG4UCUfOZqg5X9DOFIKpFBobRU9fol5WFVCW5h/UV3Z8r9Gd2VHpTQ0QeJYTKroki YaXp1ezZA7g0/D83SjkUQcsh0zIqyTDAMvnar5vYVuBFvqgI5W6VxW1E8ofa16ZbXk4XsA PRx+Fs5M6d8o1KRtKdcnyQkS3F++2HmRelfaIDjeME96KonnhXJS3uFzRlFcew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T4WcS0K6qz1NFn; Wed, 3 Jan 2024 01:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40310tJ8050850; Wed, 3 Jan 2024 01:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40310tTe050847; Wed, 3 Jan 2024 01:00:55 GMT (envelope-from git) Date: Wed, 3 Jan 2024 01:00:55 GMT Message-Id: <202401030100.40310tTe050847@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mark Johnston Subject: git: 0524b7ffff66 - main - sysutils/mbgtools: Add error checking for copyin() and copyout() calls List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0524b7ffff66cbc220a165480cc553e8d18bdc91 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/ports/commit/?id=0524b7ffff66cbc220a165480cc553e8d18bdc91 commit 0524b7ffff66cbc220a165480cc553e8d18bdc91 Author: Mark Johnston AuthorDate: 2024-01-02 18:07:59 +0000 Commit: Mark Johnston CommitDate: 2024-01-03 00:59:29 +0000 sysutils/mbgtools: Add error checking for copyin() and copyout() calls This will be required soon, and the previous lack of such error handling was a bug. PR: 275986 Approved by: antoine --- sysutils/mbgtools/Makefile | 1 + sysutils/mbgtools/files/patch-mbglib_common_macioctl.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/sysutils/mbgtools/Makefile b/sysutils/mbgtools/Makefile index c8884cd1f80d..44044a6553c5 100644 --- a/sysutils/mbgtools/Makefile +++ b/sysutils/mbgtools/Makefile @@ -1,5 +1,6 @@ PORTNAME= mbgtools DISTVERSION= fbsd-1.0.0 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.meinberg.de/download/drivers/ diff --git a/sysutils/mbgtools/files/patch-mbglib_common_macioctl.h b/sysutils/mbgtools/files/patch-mbglib_common_macioctl.h new file mode 100644 index 000000000000..aaf89acfbd48 --- /dev/null +++ b/sysutils/mbgtools/files/patch-mbglib_common_macioctl.h @@ -0,0 +1,17 @@ +--- mbglib/common/macioctl.h.orig 2024-01-02 18:05:57 UTC ++++ mbglib/common/macioctl.h +@@ -259,10 +259,12 @@ typedef struct + memcpy( _piob, _pin, _size ) + + #define _frc_iob_to_pout( _piob, _pout, _size ) \ +- copyout( _piob, _pout, _size ) ++ if (copyout( _piob, _pout, _size ) != 0) \ ++ goto err_inval + + #define _frc_iob_from_pin( _piob, _pin, _size ) \ +- copyin( _pin, _piob, _size ) ++ if (copyin( _pin, _piob, _size ) != 0) \ ++ goto err_inval + + #define _io_wait_pcps_sec_change( _pddev, _cmd, _type, _pout ) \ + goto err_inval