From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWSaH-0008D5-SZ for guix-patches@gnu.org; Fri, 22 Jun 2018 16:23:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWSaE-0001x1-Ot for guix-patches@gnu.org; Fri, 22 Jun 2018 16:23:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWSaE-0001wu-Kb for guix-patches@gnu.org; Fri, 22 Jun 2018 16:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fWSaE-0002bj-Eh for guix-patches@gnu.org; Fri, 22 Jun 2018 16:23:02 -0400 Subject: [bug#31934] [PATCH] Fix ALSA_PLUGIN_DIR usage Resent-Message-ID: Date: Fri, 22 Jun 2018 22:22:46 +0200 From: Julien Lepiller Message-ID: <20180622222246.49ea21b5@lepiller.eu> In-Reply-To: <871scyy4u2.fsf@gnu.org> References: <871scyy4u2.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: 31934@debbugs.gnu.org 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 n= ot > =E2=80=98search-paths=E2=80=99. The latter is meant to be used by things= 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. The native-search-paths vs search-paths is a bit confusing... I need to read the manual more carefully I guess.