File: 52-hosts-overflow.dpatch

package info (click to toggle)
squid 2.6.5-6etch5
  • links: PTS
  • area: main
  • in suites: etch
  • size: 12,540 kB
  • ctags: 13,801
  • sloc: ansic: 105,278; sh: 6,083; makefile: 1,297; perl: 1,245; awk: 40
file content (27 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/sh /usr/share/dpatch/dpatch-run
## 52-hosts-overflow.dpatch by Luigi Gangitano <luigi@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad squid-2.6.5~/src/tools.c squid-2.6.5/src/tools.c
--- squid-2.6.5~/src/tools.c	2006-11-01 21:58:52.000000000 +0100
+++ squid-2.6.5/src/tools.c	2006-11-06 11:42:54.000000000 +0100
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.c,v 1.249 2006/11/01 20:58:52 wessels Exp $
+ * $Id: tools.c,v 1.250 2006/11/04 17:09:45 hno Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -1178,7 +1178,7 @@
 	    if (Config.appendDomain && !strchr(lt, '.')) {
 		/* I know it's ugly, but it's only at reconfig */
 		strncpy(buf2, lt, 512);
-		strncat(buf2, Config.appendDomain, 512 - strlen(lt));
+		strncat(buf2, Config.appendDomain, 512 - strlen(lt) - 1);
 		host = buf2;
 	    } else {
 		host = lt;