14 Jun
2013
14 Jun
'13
1:59 p.m.
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;
--
Krzysztof Halasa
Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland