-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpatch_prnetdb.c
More file actions
42 lines (40 loc) · 1.2 KB
/
patch_prnetdb.c
File metadata and controls
42 lines (40 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- /home/benutzer/Downloads/mozilla-release/nsprpub/pr/src/misc/prnetdb.c 2015-01-23 07:00:07.000000000 +0100
+++ /home/benutzer/Downloads/mozilla-release/nsprpub/pr/src/misc/prnetdb_new.c 2015-02-10 13:53:50.703903646 +0100
@@ -7,6 +7,10 @@
#include <string.h>
+//EDIT:
+#include "badhosts.h"
+//EDIT:END
+
/*
* On Unix, the error code for gethostbyname() and gethostbyaddr()
* is returned in the global variable h_errno, instead of the usual
@@ -1956,6 +1960,13 @@ pr_GetAddrInfoByNameFB(const char *host
PRUint16 af,
PRIntn flags)
{
+ //EDIT:
+ if (isbadhost(hostname))
+ {
+ return NULL;
+ }
+ //EDIT:END
+
PRStatus rv;
PRAddrInfoFB *ai;
/* fallback on PR_GetHostByName */
@@ -1979,6 +1990,14 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf
PRUint16 af,
PRIntn flags)
{
+
+ //EDIT:
+ if (isbadhost(hostname))
+ {
+ return NULL;
+ }
+ //EDIT:END
+
/* restrict input to supported values */
if ((af != PR_AF_INET && af != PR_AF_UNSPEC) ||
(flags & ~ PR_AI_NOCANONNAME) != PR_AI_ADDRCONFIG) {