From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWqUo-0006ci-Uc for guix-patches@gnu.org; Sat, 23 Jun 2018 17:55:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWqUo-0001ZY-6K for guix-patches@gnu.org; Sat, 23 Jun 2018 17:55:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53824) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWqUo-0001ZQ-2J for guix-patches@gnu.org; Sat, 23 Jun 2018 17:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fWqUn-0000Pz-SJ for guix-patches@gnu.org; Sat, 23 Jun 2018 17:55:01 -0400 Subject: [bug#31934] [PATCH] Fix ALSA_PLUGIN_DIR usage Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <871scyy4u2.fsf@gnu.org> <20180622222246.49ea21b5@lepiller.eu> Date: Sat, 23 Jun 2018 23:54:22 +0200 In-Reply-To: <20180622222246.49ea21b5@lepiller.eu> (Julien Lepiller's message of "Fri, 22 Jun 2018 22:22:46 +0200") Message-ID: <87lgb5w4mp.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Julien Lepiller Cc: 31934@debbugs.gnu.org Julien Lepiller skribis: > Le Fri, 22 Jun 2018 21:54:45 +0200, > ludo@gnu.org (Ludovic Court=C3=A8s) a =C3=A9crit : > >> Could you clarify which issue this fixes? >>=20 >> Also, I think you really want =E2=80=98native-search-paths=E2=80=99 and = not >> =E2=80=98search-paths=E2=80=99. The latter is meant to be used by thing= s like >> cross-compilers. >>=20 >> Thanks, >> Ludo=E2=80=99. > > The issue was that a part of the code was only partially patched. It > looked like: > > plugdir =3D ALSA_PLUGIN_DIR; > envplugdir =3D getenv("ALSA_PLUGIN_DIR"); > if(envplugdir !=3D NULL) > plugdir =3D envplugdir; > ... > sofile =3D malloc(sizeof(plugdir) + ...); > ... > sprintf(sofile, "%s/whatever.so", ALSA_PLUGIN_DIR); > > If at compilation time ALSA_PLUGIN_DIR is bigger than the runtime > $ALSA_PLUGIN_DIR, we are in trouble: alsa-lib will crash because of a > buffer overflow. Otherwise, it just didn't care about $ALSA_PLUGIN_DIR. Alright, so the patch update can definitely go in! > The native-search-paths vs search-paths is a bit confusing... I need to > read the manual more carefully I guess. The manual doesn=E2=80=99t say much about this, so you have a good excuse. But anyway, that change is surely not necessary. Thanks, Ludo=E2=80=99.