Forward port of 2.5 changes.
/*
- * $Id: rfc1035.h,v 1.16 2005/10/23 14:10:45 serassio Exp $
+ * $Id: rfc1035.h,v 1.17 2006/04/23 09:02:13 serassio Exp $
*
* AUTHOR: Duane Wessels
*
#endif
/* rfc1035 - DNS */
-#define RFC1035_MAXHOSTNAMESZ 250
+#define RFC1035_MAXHOSTNAMESZ 256
typedef struct _rfc1035_rr rfc1035_rr;
struct _rfc1035_rr {
char name[RFC1035_MAXHOSTNAMESZ];
/*
- * $Id: util.h,v 1.72 2005/04/18 21:52:40 hno Exp $
+ * $Id: util.h,v 1.73 2006/04/23 09:02:13 serassio Exp $
*
* AUTHOR: Harvest Derived
*
#endif
#if !defined(SQUIDHOSTNAMELEN)
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifndef _SQUID_MSWIN_
-#ifndef _SQUID_NETDB_H_ /* need protection on NEXTSTEP */
-#define _SQUID_NETDB_H_
-#include <netdb.h>
-#endif
-#endif
-#if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 128)
-#define SQUIDHOSTNAMELEN 128
-#else
-#define SQUIDHOSTNAMELEN MAXHOSTNAMELEN
-#endif
+#define SQUIDHOSTNAMELEN 256
#endif
#if defined(_SQUID_FREEBSD_)
/*
- * $Id: internal.cc,v 1.37 2006/02/17 20:15:35 wessels Exp $
+ * $Id: internal.cc,v 1.38 2006/04/23 09:02:13 serassio Exp $
*
* DEBUG: section 76 Internal Squid Object handling
* AUTHOR: Duane, Alex, Henrik
static char lc_host[SQUIDHOSTNAMELEN];
assert(host && name);
/* convert host name to lower case */
- xstrncpy(lc_host, host, SQUIDHOSTNAMELEN - 1);
+ xstrncpy(lc_host, host, SQUIDHOSTNAMELEN);
Tolower(lc_host);
/*
* append the domain in order to mirror the requests with appended
/*
- * $Id: squid.h,v 1.249 2006/04/22 05:29:20 robertc Exp $
+ * $Id: squid.h,v 1.250 2006/04/23 09:02:13 serassio Exp $
*
* AUTHOR: Duane Wessels
*
#include <math.h>
#endif
-#if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 128)
-#define SQUIDHOSTNAMELEN 128
-#else
-#define SQUIDHOSTNAMELEN MAXHOSTNAMELEN
-#endif
+#define SQUIDHOSTNAMELEN 256
#define SQUID_MAXPATHLEN 256
#ifndef MAXPATHLEN
/*
- * $Id: url.cc,v 1.150 2006/01/19 18:50:36 wessels Exp $
+ * $Id: url.cc,v 1.151 2006/04/23 09:02:13 serassio Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
#endif
if (Config.appendDomain && !strchr(host, '.'))
- strncat(host, Config.appendDomain, SQUIDHOSTNAMELEN);
+ strncat(host, Config.appendDomain, SQUIDHOSTNAMELEN - strlen(host) - 1);
if (port < 1 || port > 65535) {
debug(23, 3) ("urlParse: Invalid port '%d'\n", port);