diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-09-20 11:39:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:30 -0500 |
commit | b7545608ad0cbcc017219cd4b2d699a25500c5f1 (patch) | |
tree | a5ed40d813b436aff0c6c6c58c8ff55b4a8ac531 | |
parent | f1b39f9b809ce767ddf16bb6b596649441f28f47 (diff) | |
download | samba-b7545608ad0cbcc017219cd4b2d699a25500c5f1.tar.gz samba-b7545608ad0cbcc017219cd4b2d699a25500c5f1.tar.xz samba-b7545608ad0cbcc017219cd4b2d699a25500c5f1.zip |
r10346: here are only real ip-addresses valid, prevent dns lookups,
when the input is invalid
metze
(This used to be commit 1083204c1f89d9b918015113b6cc2ea423372fe0)
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 4d3ac2c774..e559ea8ff6 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -569,7 +569,9 @@ NTSTATUS ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char ** */ NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address) { - uint32_t addr = interpret_addr(address); + uint32_t addr; + if (!is_ipaddress(address)) return NT_STATUS_INVALID_PARAMETER_MIX; + addr = sys_inet_addr(address); NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, htonl(addr))); return NT_STATUS_OK; } |