From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 990F41395E3 for ; Tue, 15 Nov 2016 03:34:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DAB88E0AF0; Tue, 15 Nov 2016 03:34:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5DE51E0B03 for ; Tue, 15 Nov 2016 03:34:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2A93A34165B for ; Tue, 15 Nov 2016 03:34:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E1C8924B0 for ; Tue, 15 Nov 2016 03:34:34 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1479175936.743d4fe35a8d6029bc0da10b5b3d9f095a07f2c1.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: main.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 743d4fe35a8d6029bc0da10b5b3d9f095a07f2c1 X-VCS-Branch: master Date: Tue, 15 Nov 2016 03:34:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 61770f62-ea58-44fb-858f-a89ce1061680 X-Archives-Hash: ec1cb048ba65c900b1c603d565bb46f6 commit: 743d4fe35a8d6029bc0da10b5b3d9f095a07f2c1 Author: Mike Frysinger gentoo org> AuthorDate: Tue Nov 15 02:12:16 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Nov 15 02:12:16 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=743d4fe3 qpkg: fix bad pointer passing Taking an address of a stack buffer doesn't do what we want. Create a local variable to hold the address to pass down. URL: https://bugs.gentoo.org/598974 Reported-by: Alexander Wetzel web.de> main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index e9e65b4..f6e5184 100644 --- a/main.c +++ b/main.c @@ -1356,6 +1356,7 @@ _q_static queue *get_vdb_atoms(int fullcpv) char buf[_Q_PATH_MAX]; char slot[_Q_PATH_MAX]; + char *slotp = slot; size_t slot_len; struct dirent **cat; @@ -1384,7 +1385,7 @@ _q_static queue *get_vdb_atoms(int fullcpv) * until this is rewritten & merged into libq/vdb.c. */ slot_len = sizeof(slot); strncat(buf, "/SLOT", sizeof(buf)); - eat_file_at(ctx->vdb_fd, buf, (char **)&slot, &slot_len); + eat_file_at(ctx->vdb_fd, buf, &slotp, &slot_len); rmspace(slot); if (fullcpv) {