[alsa-devel] SEGFAULT in ALSA lib 1.0.27.1 pcm_direct parser
Hi,
Fixes a segfault when getgrnam_r() returns 0 and still sets pgrp to NULL when the group simply doesn't exist.
--- alsa-lib/src/pcm/pcm_direct.c 2013-05-21 10:48:28.000000000 +0200 +++ alsa-lib/src/pcm/pcm_direct.c 2013-06-14 13:31:28.981013646 +0200 @@ -1636,7 +1636,7 @@ if (buffer == NULL) return -ENOMEM; int st = getgrnam_r(group, &grp, buffer, len, &pgrp); - if (st != 0) { + if (st != 0 || !pgrp) { SNDERR("The field ipc_gid must be a valid group (create group %s)", group); free(buffer); return -EINVAL;
Date 14.6.2013 13:59, Krzysztof Hałasa wrote:
Hi,
Fixes a segfault when getgrnam_r() returns 0 and still sets pgrp to NULL when the group simply doesn't exist.
Thanks. Applied to our repo.
Jaroslav
participants (2)
-
Jaroslav Kysela
-
khalasa@piap.pl