mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
nscd: Use time_t for return type of addgetnetgrentX
Using int may give false results for future dates (timeouts after the year 2028). Fixes commit 04a21e050d64a1193a6daab872bca2528bda44b ("CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX (bug 31680)"). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
ded2e0753e
commit
4bbca1a446
@ -680,7 +680,7 @@ readdinnetgr (struct database_dyn *db, struct hashentry *he,
|
|||||||
.key_len = he->len
|
.key_len = he->len
|
||||||
};
|
};
|
||||||
|
|
||||||
int timeout = addinnetgrX (db, -1, &req, db->data + he->key, he->owner,
|
time_t timeout = addinnetgrX (db, -1, &req, db->data + he->key, he->owner,
|
||||||
he, dh);
|
he, dh);
|
||||||
if (timeout < 0)
|
if (timeout < 0)
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user