From nobody Sun Jun 02 22:55:47 2024 X-Original-To: dev-commits-src-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 4Vssdw1W06z5LQF0; Sun, 02 Jun 2024 22:55:48 +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 4Vssdw0rzVz45BB; Sun, 2 Jun 2024 22:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717368948; 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=KWTkgGPz2T2zdG2XEQcKXCU9d9FXqiMl+QDWdZEYn1g=; b=eebB9DYCeHEDSnX44sTMv/D+nFFFTxRJQPtU8e7C+ozlwnKmNIN4IBBkEbNzIPH1q/z2Pk sryCgRroFpirXX7O05xYsBQC7Bj6sQmwJSHO1e7T26PsM3kgQoh02lmFKn6I2+IEQgDdm/ bxxyAlT6Cb9CVN6/KSmgsYwUtxCYJuD9+FVumtXOgZiak7mAmq6bvk/lB4Kpl6JiDmjZIG qrJw2VMBUR+Rgt1/X+GWWsFAbgNckES/js5VkgE/+jROlNg8jlpknO+UeNWDR+AU20HNRi jGgIcIro0ZiYHatWV/zz4LF+V3/1ofJgwmjqo5v2FddzfGv3FskVWff9jJJ1ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717368948; a=rsa-sha256; cv=none; b=Viu6khbxtdLUPV3h8BeYdGOLOnJVUafvaJkPdr7YFUwey4jI1A20Jjtf0iEDAUVq9W8iDS 9Ohu80msUE6LfRXdj3bSdd6brGgM+qPqzqNxGxIkp+s1Y4lXE6aQZM1Jtpe70WBztNpiQ6 5s628aLjeKRHbfHOe1WXBNB7Gu4uDLAy5a7BrNt2SoMu6vMBAgK3juaIQDiJMUrTWwk2ml NfpXTq8B3LPc0ZQMXPD8SVWNaRi/7GAcrViqKFujIvdwDQs2N1PHuiGe/cirOQmdK4Vnqc e24bdziw/IwbaQMIPkBNAqx1vlcOD8wPYOetrB4FvDr/HHGy2cPXNAOv0/1XKA== 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=1717368948; 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=KWTkgGPz2T2zdG2XEQcKXCU9d9FXqiMl+QDWdZEYn1g=; b=HJQBKcUq51iWTJu4P19vzowxmyCe9wQk0/+eDpaif16GG+eWlaHy/5IbrWqDLlQICwEzzP 2cUUqm1r0p9eu8JoCKd0LP8Wfq+S5o87zLD5D3ysjdsMWH7QKT0dJ/cttB2djeDwv63kCE XOKidJH1cPMnQQWCPpIw0dDgtVbLrQm0brv4mWJ6/HwF7wn6U8hoGnLMQDcShTWKMq6vdD 2aFZGaKcoA2DIcBKjnwwTf6Yog8ay7e9EWKIWyBCWLlpQ/YzFO88dAks8UbLmQKt2r45Ys FN0KLOyffwmJmgKAjYOTmjDT5jBltrCTXAJnFzLRDbhqkWueDTLhKr27nuhXxw== 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 4Vssdw0KHMz18s6; Sun, 2 Jun 2024 22:55:48 +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 452Mtlvg070427; Sun, 2 Jun 2024 22:55:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 452MtlmZ070424; Sun, 2 Jun 2024 22:55:47 GMT (envelope-from git) Date: Sun, 2 Jun 2024 22:55:47 GMT Message-Id: <202406022255.452MtlmZ070424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 25a33bfe9ce2 - main - ee: Fix use of uninitialised pointer in ispell_op List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25a33bfe9ce2b55812201f475e9d3e64009b40dc Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=25a33bfe9ce2b55812201f475e9d3e64009b40dc commit 25a33bfe9ce2b55812201f475e9d3e64009b40dc Author: Jessica Clarke AuthorDate: 2024-06-02 22:53:09 +0000 Commit: Jessica Clarke CommitDate: 2024-06-02 22:53:09 +0000 ee: Fix use of uninitialised pointer in ispell_op This used to be name = mktemp followed by fd = open downstream, replacing upstream's crude PID-based sprintf, but in 1.4.7 this was changed upstream to this buggy code, which we then picked up in the 1.5.0 import. Presumably nobody's actually used ee's ispell function in the past 15 years; that or it's just ended up using junk file names as temporary files if name's happened to be a valid address to something that can be interpreted as a string. Reported by: Dapeng Gao Fixes: 96b676e99984 ("Update ee(1) in the base system to version 1.5.0.") MFC after: 1 week --- contrib/ee/ee.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 072d26519f4c..5576537f3fad 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -4431,6 +4431,7 @@ ispell_op(void) } (void)sprintf(template, "/tmp/ee.XXXXXXXX"); fd = mkstemp(template); + name = template; if (fd < 0) { wmove(com_win, 0, 0); wprintw(com_win, create_file_fail_msg, name);