summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2009-05-28 05:24:54 +0200
committerDavid Shaw <dshaw@jabberwocky.com>2009-05-28 05:24:54 +0200
commitfb866ea151697c0f6999467e2e822a3ef64eff98 (patch)
tree3ee2704ad938ab62a6050c1a9af643e4719df68e
parentsignal cleanup fix (diff)
downloadgnupg2-fb866ea151697c0f6999467e2e822a3ef64eff98.tar.xz
gnupg2-fb866ea151697c0f6999467e2e822a3ef64eff98.zip
* srv.c (getsrv): Raise maximum packet size to 2048, as PACKETSZ is
too small these days.
-rw-r--r--common/ChangeLog5
-rw-r--r--common/srv.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index 18167e426..1e2119b53 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-27 David Shaw <dshaw@jabberwocky.com>
+
+ * srv.c (getsrv): Raise maximum packet size to 2048, as PACKETSZ
+ is too small these days.
+
2009-05-22 Werner Koch <wk@g10code.com>
* ttyio.c (tty_cleanup_after_signal): New.
diff --git a/common/srv.c b/common/srv.c
index a39305937..9c8977e8e 100644
--- a/common/srv.c
+++ b/common/srv.c
@@ -1,5 +1,5 @@
/* srv.c - DNS SRV code
- * Copyright (C) 2003 Free Software Foundation, Inc.
+ * Copyright (C) 2003, 2009 Free Software Foundation, Inc.
*
* This file is part of GNUPG.
*
@@ -55,15 +55,15 @@ priosort(const void *a,const void *b)
int
getsrv(const char *name,struct srventry **list)
{
- unsigned char answer[PACKETSZ];
+ unsigned char answer[2048];
int r,srvcount=0;
unsigned char *pt,*emsg;
u16 count,dlen;
*list=NULL;
- r=res_query(name,C_IN,T_SRV,answer,PACKETSZ);
- if(r<sizeof(HEADER) || r>PACKETSZ)
+ r=res_query(name,C_IN,T_SRV,answer,2048);
+ if(r<sizeof(HEADER) || r>2048)
return -1;
if((((HEADER *)answer)->rcode)==NOERROR &&