This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nss/19835] New: __nss_getent calls function through a pointer of invalid type
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 17 Mar 2016 15:17:11 +0000
- Subject: [Bug nss/19835] New: __nss_getent calls function through a pointer of invalid type
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19835
Bug ID: 19835
Summary: __nss_getent calls function through a pointer of
invalid type
Product: glibc
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: nss
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
Flags: security-
The situation is this:
typedef int (*getent_r_function) (void *, char *, size_t,
void **result, int *);
â
__nss_getent (getent_r_function func, void **resbuf, char **buffer,
size_t buflen, size_t *buffer_size, int *h_errnop)
â
&& func (resbuf, *buffer, *buffer_size, &result, h_errnop) == ERANGE
â
But __nss_getent is called with a pointer to (for example) __getgrent_r, which
is declated as:
extern int getgrent_r (struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct group **__restrict __result);
So some of the function argument types do not match, and the code is not valid
C.
--
You are receiving this mail because:
You are on the CC list for the bug.