diff options
author | Werner Koch <[email protected]> | 2015-10-22 07:52:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-10-22 07:52:51 +0000 |
commit | e03a4a94bb67d4a6c958b37671f83456e203f325 (patch) | |
tree | 2f51a601a5e487a7cbf7863c84be1b63c4cf4669 /dirmngr/dns-stuff.h | |
parent | Move SRV RR code from common/ to dirmngr/. (diff) | |
download | gnupg-e03a4a94bb67d4a6c958b37671f83456e203f325.tar.gz gnupg-e03a4a94bb67d4a6c958b37671f83456e203f325.zip |
dirmngr: Do not use MAXDNAME.
* dirmngr/dns-stuff.c (getsrv): Replace MAXDNAME.
* dirmngr/dns-stuff.h (MAXDNAME): Remove.
(struct srventry): Use a fixed value instead of MAXDNAME.
* dirmngr/http.c (connect_server): Use DIMof instead of MAXDNAME.
Malloc a helper array.
--
Depending on the order of included headers it might be that we allocate
the array with a different size than what we test against in another
module. To make it more robust we use the actual known size of
checking.
A better would be to use a linked list and avoid these large arrays.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | dirmngr/dns-stuff.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/dirmngr/dns-stuff.h b/dirmngr/dns-stuff.h index 5ffa0178f..13c47df52 100644 --- a/dirmngr/dns-stuff.h +++ b/dirmngr/dns-stuff.h @@ -71,18 +71,13 @@ struct dns_addrinfo_s }; - -#ifndef MAXDNAME -#define MAXDNAME 1025 -#endif - struct srventry { unsigned short priority; unsigned short weight; unsigned short port; int run_count; - char target[MAXDNAME]; + char target[1025]; }; |