From b7545608ad0cbcc017219cd4b2d699a25500c5f1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 20 Sep 2005 11:39:40 +0000 Subject: r10346: here are only real ip-addresses valid, prevent dns lookups, when the input is invalid metze (This used to be commit 1083204c1f89d9b918015113b6cc2ea423372fe0) --- source4/librpc/ndr/ndr_basic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit