From nobody Mon Jan 31 18:11:46 2022 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 65045198050C; Mon, 31 Jan 2022 18:11:47 +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 4Jnbjv0bt2z4kll; Mon, 31 Jan 2022 18:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643652707; 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=Gnr8VTx2rLiAhWXf6PhvmDQJ0l7g706gV4/LJaVETUc=; b=f0LpYCSA1L9hyU8mkv1EFTqQYWeNUON++jaaG+QXmJa4YhhLz/hzuwNKJfdqvWvayeHfQU N4DeSbafzA+yVZxj618qzZYPICu4TomvKQhZWXbNDC6sVas+e2kokiOOJj7InaKmnMlGmm UTuW6iGCFnEOS1SnCyhadxbjPr2q2BVGKXSdsjFaFwnvH6a4YkCLeErgtOwKRqojGpaSRo wWfcF7DAV5LMfwpVK0Fgg8FlkRjAiXa+iAWt3BML7MVazpQWydarb/Ay2TiANS2Bwp+6eQ b2tr4od9HZOnjFLzMkkF+i7jXkwQZadBcQAvGw4qfaQ9UnGAF3Z9HboGdQsyZA== 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 D4ECF20EC1; Mon, 31 Jan 2022 18:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20VIBker046498; Mon, 31 Jan 2022 18:11:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20VIBkrb046497; Mon, 31 Jan 2022 18:11:46 GMT (envelope-from git) Date: Mon, 31 Jan 2022 18:11:46 GMT Message-Id: <202201311811.20VIBkrb046497@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: 00ad40d70a67 - main - throw an error if reading from stdin failed 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00ad40d70a67f0dd8c18d30ff3d0290f924b2ac8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643652707; 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=Gnr8VTx2rLiAhWXf6PhvmDQJ0l7g706gV4/LJaVETUc=; b=kBsDQZ6o2E3GUMMhyomdnlHfOGPMXOrWnIUJZ6gjNGPVAeQ1hIT1QF+doRVfP3NHh2kfJO i7FkbkSDRdpgg8h3868n/B6oDxBEi55u5PTamfNxqKx7X8+d8KXnwVw7NTZzwTQ9N5Zeql 6v2U0O2ivTXWjhWnxeQaO5oeYmGrY2H0NzKqnKvyYPMMAen26+cSfy6azMcuE4pQJzDpk/ SSsQgtgAeKahNL8WL+a9rE0PZvEZf6ia+2oSiYCgo2DTNX9AR5mwnoEF9fOFarkPhNJsFe K6azlgZs+hKGQA8Tt5ScJvxxwuiD7R0FqbCn6Tc3BeoD+7BsRkTJYoXG2GPCcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643652707; a=rsa-sha256; cv=none; b=APUnd85dlAXfoLBKSy13hFZl3f0stiE5f3iNZOy6HRwIzvqh+l0Bnb4YhjgiqyXh3gZAmB 4It2vetxvAQ518/oPYcXHHd/4MKWMsy6g4PjhjQb+CtWqmMBTrpN2LZKMV1btbHix9ki6a ODzDtXQq0+j0BBDLWHSnEBfd5DxA6C1nLqEhv2qCmQd2bzCTwCwjMTcB3supdFj1LHYUBA JcuF5qK3oCZC0lx0Q0s4l/K4EQ00UxtGpRG24Hjtw5XFYznCDEm9Fl8dE4m2wf31NJQeuE jk/+jJDrY1u6y2GD9qsjKRrDmMPcjkbsSGm6sr7lMYf7Nx1eeQTk4zg9UXggpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=00ad40d70a67f0dd8c18d30ff3d0290f924b2ac8 commit 00ad40d70a67f0dd8c18d30ff3d0290f924b2ac8 Author: Wolfram Schneider AuthorDate: 2022-01-31 18:04:45 +0000 Commit: Wolfram Schneider CommitDate: 2022-01-31 18:04:45 +0000 throw an error if reading from stdin failed --- usr.bin/locate/bigram/locate.bigram.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.bin/locate/bigram/locate.bigram.c b/usr.bin/locate/bigram/locate.bigram.c index a654448680a3..c6b2d921fdf0 100644 --- a/usr.bin/locate/bigram/locate.bigram.c +++ b/usr.bin/locate/bigram/locate.bigram.c @@ -103,6 +103,9 @@ main(void) oldpath = buf2; } } + if (!feof(stdin) || ferror(stdin)) + err(1, "stdin"); + /* output, boundary check */ for (i = ASCII_MIN; i <= ASCII_MAX; i++)