[svn] GnuPG - r5025 - trunk/common

svn author dshaw cvs at cvs.gnupg.org
Thu May 28 05:24:54 CEST 2009


Author: dshaw
Date: 2009-05-28 05:24:54 +0200 (Thu, 28 May 2009)
New Revision: 5025

Modified:
   trunk/common/ChangeLog
   trunk/common/srv.c
Log:
* srv.c (getsrv): Raise maximum packet size to 2048, as PACKETSZ is
too small these days.


Modified: trunk/common/ChangeLog
===================================================================
--- trunk/common/ChangeLog	2009-05-26 14:15:56 UTC (rev 5024)
+++ trunk/common/ChangeLog	2009-05-28 03:24:54 UTC (rev 5025)
@@ -1,3 +1,8 @@
+2009-05-27  David Shaw  <dshaw at jabberwocky.com>
+
+	* srv.c (getsrv): Raise maximum packet size to 2048, as PACKETSZ
+	is too small these days.
+
 2009-05-22  Werner Koch  <wk at g10code.com>
 
 	* ttyio.c (tty_cleanup_after_signal): New.

Modified: trunk/common/srv.c
===================================================================
--- trunk/common/srv.c	2009-05-26 14:15:56 UTC (rev 5024)
+++ trunk/common/srv.c	2009-05-28 03:24:54 UTC (rev 5025)
@@ -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 @@
 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 &&




More information about the Gnupg-commits mailing list