aboutsummaryrefslogtreecommitdiffstats
path: root/util/srv.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2006-01-26 16:51:04 +0000
committerDavid Shaw <[email protected]>2006-01-26 16:51:04 +0000
commit23cfe019e99f54a229b0eeb68d4afb1a788b2886 (patch)
treeac8a2fd6e5ce06c805efda4fd249d2d25ba13507 /util/srv.c
parent* keyserver.c (parse_keyserver_uri): If there is a path present, set the (diff)
downloadgnupg-23cfe019e99f54a229b0eeb68d4afb1a788b2886.tar.gz
gnupg-23cfe019e99f54a229b0eeb68d4afb1a788b2886.zip
* cert.c (get_cert): Disable IPGP types for now until the format questions
in the draft are settled. * srv.c (getsrv): Error on oversize SRV responses.
Diffstat (limited to '')
-rw-r--r--util/srv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/srv.c b/util/srv.c
index 21f1d9ade..95187dbc8 100644
--- a/util/srv.c
+++ b/util/srv.c
@@ -42,7 +42,8 @@
#define T_SRV 33
#endif
-static int priosort(const void *a,const void *b)
+static int
+priosort(const void *a,const void *b)
{
const struct srventry *sa=a,*sb=b;
if(sa->priority>sb->priority)
@@ -64,7 +65,7 @@ getsrv(const char *name,struct srventry **list)
*list=NULL;
r=res_query(name,C_IN,T_SRV,answer,PACKETSZ);
- if(r<sizeof(HEADER))
+ if(r<sizeof(HEADER) || r>PACKETSZ)
return -1;
if((((HEADER *)answer)->rcode)==NOERROR &&