GNU bug report logs - #31934
[PATCH] Fix ALSA_PLUGIN_DIR usage

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Fri, 22 Jun 2018 12:40:02 UTC

Severity: normal

Tags: patch

Done: iyzsong <at> member.fsf.org (宋文武)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: 31934 <at> debbugs.gnu.org
Subject: [bug#31934] [PATCH] Fix ALSA_PLUGIN_DIR usage
Date: Sat, 23 Jun 2018 23:54:22 +0200
Julien Lepiller <julien <at> lepiller.eu> skribis:

> Le Fri, 22 Jun 2018 21:54:45 +0200,
> ludo <at> gnu.org (Ludovic Courtès) a écrit :
>
>> Could you clarify which issue this fixes?
>> 
>> Also, I think you really want ‘native-search-paths’ and not
>> ‘search-paths’.  The latter is meant to be used by things like
>> cross-compilers.
>> 
>> Thanks,
>> Ludo’.
>
> The issue was that a part of the code was only partially patched. It
> looked like:
>
> plugdir = ALSA_PLUGIN_DIR;
> envplugdir = getenv("ALSA_PLUGIN_DIR");
> if(envplugdir != NULL)
>   plugdir = envplugdir;
> ...
> sofile = 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’t say much about this, so you have a good excuse.

But anyway, that change is surely not necessary.

Thanks,
Ludo’.




This bug report was last modified 7 years and 18 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.