diff options
author | Florian Weimer <fweimer@redhat.com> | 2025-09-12 21:33:34 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2025-09-19 09:36:13 +0200 |
commit | 60795200d4deac38e2c9a49ba9a5ab7b2a96b242 (patch) | |
tree | 0efc5e13753904a46476cd31c90d9fd0d4e6d28b | |
parent | 2966a6a3a0fd49eb4e3c9b05bc26977a1df98c99 (diff) | |
download | glibc-release/2.40/master.zip glibc-release/2.40/master.tar.gz glibc-release/2.40/master.tar.bz2 |
nss: Group merge does not react to ERANGE during merge (bug 33361)release/2.40/master
The break statement in CHECK_MERGE is expected to exit the surrounding
while loop, not the do-while loop with in the macro. Remove the
do-while loop from the macro. It is not needed to turn the macro
expansion into a single statement due to the way CHECK_MERGE is used
(and the statement expression would cover this anyway).
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
(cherry picked from commit 0fceed254559836b57ee05188deac649bc505d05)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | nss/getXXbyYY_r.c | 18 |
2 files changed, 8 insertions, 11 deletions
@@ -29,6 +29,7 @@ The following bugs are resolved with this release: [32987] elf: Fix subprocess status handling for tst-dlopen-sgid [33185] Fix double-free after allocation failure in regcomp [33234] Use TLS initial-exec model for __libc_tsd_CTYPE_* thread variables + [33361] nss: Group merge does not react to ERANGE during merge Version 2.40 diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index fe7d5b7..3a15b1a 100644 --- a/nss/getXXbyYY_r.c +++ b/nss/getXXbyYY_r.c @@ -157,19 +157,15 @@ __merge_einval (LOOKUP_TYPE *a, #define CHECK_MERGE(err, status) \ ({ \ - do \ + if (err) \ { \ - if (err) \ - { \ - __set_errno (err); \ - if (err == ERANGE) \ - status = NSS_STATUS_TRYAGAIN; \ - else \ - status = NSS_STATUS_UNAVAIL; \ - break; \ - } \ + __set_errno (err); \ + if (err == ERANGE) \ + status = NSS_STATUS_TRYAGAIN; \ + else \ + status = NSS_STATUS_UNAVAIL; \ + break; \ } \ - while (0); \ }) /* Type of the lookup function we need here. */ |