/[pkg-src]/trunk/xorg-server/patches/xorg-server-1.17.1-os-access-fix-regression-in-server-interpreted-auth.patch |
Annotation of /trunk/xorg-server/patches/xorg-server-1.17.1-os-access-fix-regression-in-server-interpreted-auth.patch
Parent Directory | Revision Log
Revision 2576 -
(hide annotations)
(download)
Mon Jun 15 13:02:17 2015 UTC (8 years, 11 months ago) by niro
File size: 993 byte(s)
Mon Jun 15 13:02:17 2015 UTC (8 years, 11 months ago) by niro
File size: 993 byte(s)
-fixed garbage patches
1 | niro | 2576 | diff --git a/os/access.c b/os/access.c |
2 | niro | 2575 | index 28f2d32..fe6e831 100644 |
3 | niro | 2576 | --- a/os/access.c |
4 | +++ b/os/access.c | ||
5 | @@ -1390,14 +1390,23 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client) | ||
6 | niro | 2575 | else |
7 | return 0; | ||
8 | } | ||
9 | niro | 2576 | + |
10 | + /* An empty address requires both a NULL addr *and* a zero length | ||
11 | + * as the address comparison functions call memcmp with both | ||
12 | + * parameters. Make sure they agree here | ||
13 | + */ | ||
14 | + if (addr == NULL) | ||
15 | + len = 0; | ||
16 | + if (len == 0) | ||
17 | + addr = NULL; | ||
18 | for (host = validhosts; host; host = host->next) { | ||
19 | if (host->family == FamilyServerInterpreted) { | ||
20 | - if (addr && siAddrMatch(family, addr, len, host, client)) { | ||
21 | + if (siAddrMatch(family, addr, len, host, client)) { | ||
22 | niro | 2575 | return 0; |
23 | } | ||
24 | } | ||
25 | else { | ||
26 | niro | 2576 | - if (addr && addrEqual(family, addr, len, host)) |
27 | + if (addrEqual(family, addr, len, host)) | ||
28 | niro | 2575 | return 0; |
29 | } | ||
30 |