Sophie

Sophie

distrib > Mandriva > 2009.1 > i586 > media > main-release-src > by-pkgid > 5bbabe353a2306412825ef4250e67da2 > files > 2

ipv6calc-0.72.0-1mdv2009.1.src.rpm

diff -Naurp ipv6calc-0.72.0/ipv6loganon/ipv6loganon.c ipv6calc-0.72.0.oden/ipv6loganon/ipv6loganon.c
--- ipv6calc-0.72.0/ipv6loganon/ipv6loganon.c	2007-04-26 11:57:31.000000000 +0200
+++ ipv6calc-0.72.0.oden/ipv6loganon/ipv6loganon.c	2008-12-19 17:26:22.000000000 +0100
@@ -300,7 +300,7 @@ static int anonymizetoken(char *resultst
 		};
 
 		if (strcmp(cache_lru_key_token[cache_lru_last - 1], token) == 0) {
-			snprintf(resultstring, LINEBUFFER - 1, cache_lru_value[cache_lru_last - 1]);
+			snprintf(resultstring, LINEBUFFER - 1, "%s", cache_lru_value[cache_lru_last - 1]);
 			cache_lru_statistics[0]++;
 			if ((ipv6calc_debug & 0x4) != 0) {
 				fprintf(stderr, "LRU cache: hit last line=%d key_token=%s value=%s\n", cache_lru_last - 1, token, resultstring);
@@ -311,7 +311,7 @@ static int anonymizetoken(char *resultst
 		if (cache_lru_last > 1) {
 			for (i = cache_lru_last - 1; i > 0; i--) {
 				if (strcmp(cache_lru_key_token[i - 1], token) == 0) {
-					snprintf(resultstring, LINEBUFFER - 1, cache_lru_value[i - 1]);
+					snprintf(resultstring, LINEBUFFER - 1, "%s", cache_lru_value[i - 1]);
 					cache_lru_statistics[cache_lru_last - i]++;
 					if ((ipv6calc_debug & 0x4) != 0) {
 						fprintf(stderr, "LRU cache: hit line=%d key_token=%s value=%s\n", i - 1, token, resultstring);
@@ -324,7 +324,7 @@ static int anonymizetoken(char *resultst
 		if (cache_lru_last < cache_lru_max) {
 			for (i = cache_lru_max; i > cache_lru_last; i--) {
 				if (strcmp(cache_lru_key_token[i - 1], token) == 0) {
-					snprintf(resultstring, LINEBUFFER - 1, cache_lru_value[i - 1]);
+					snprintf(resultstring, LINEBUFFER - 1, "%s", cache_lru_value[i - 1]);
 					cache_lru_statistics[cache_lru_max - i + cache_lru_last]++;
 					if ((ipv6calc_debug & 0x4) != 0) {
 						fprintf(stderr, "LRU cache: hit line=%d key_token=%s value=%s\n", i - 1, token, resultstring);
@@ -394,7 +394,7 @@ static int anonymizetoken(char *resultst
 
 	} else {
 		/* probably reverse DNS resolving lookup string, do not touch */
-		snprintf(resultstring, LINEBUFFER - 1, token);
+		snprintf(resultstring, LINEBUFFER - 1, "%s", token);
 	};
 
 	/* use cache ? */
@@ -413,8 +413,8 @@ static int anonymizetoken(char *resultst
 		};
 
 		/* store key and value */
-		snprintf(cache_lru_key_token[cache_lru_last - 1], NI_MAXHOST - 1, token);
-		snprintf(cache_lru_value[cache_lru_last - 1], NI_MAXHOST - 1, resultstring);
+		snprintf(cache_lru_key_token[cache_lru_last - 1], NI_MAXHOST - 1, "%s", token);
+		snprintf(cache_lru_value[cache_lru_last - 1], NI_MAXHOST - 1, "%s", resultstring);
 		if ((ipv6calc_debug & 0x4) != 0) {
 			fprintf(stderr, "LRU cache: fill line=%d key_token=%s value=%s\n", cache_lru_last - 1, cache_lru_key_token[cache_lru_last - 1], cache_lru_value[cache_lru_last - 1]);
 		};
diff -Naurp ipv6calc-0.72.0/ipv6logconv/ipv6logconv.c ipv6calc-0.72.0.oden/ipv6logconv/ipv6logconv.c
--- ipv6calc-0.72.0/ipv6logconv/ipv6logconv.c	2005-10-20 18:22:41.000000000 +0200
+++ ipv6calc-0.72.0.oden/ipv6logconv/ipv6logconv.c	2008-12-19 17:22:04.000000000 +0100
@@ -377,7 +377,7 @@ static int converttoken(char *resultstri
 
 		if (cache_lru_key_outputtype[cache_lru_last - 1] == outputtype) {
 			if (strcmp(cache_lru_key_token[cache_lru_last - 1], token) == 0) {
-				snprintf(resultstring, LINEBUFFER - 1, cache_lru_value[cache_lru_last - 1]);
+				snprintf(resultstring, LINEBUFFER - 1, "%s", cache_lru_value[cache_lru_last - 1]);
 				cache_lru_statistics[0]++;
 				if (ipv6calc_debug & 0x4) {
 					fprintf(stderr, "LRU cache: hit last line=%d key_token=%s key_outputtype=%lx value=%s\n", cache_lru_last - 1, token, outputtype, resultstring);
@@ -390,7 +390,7 @@ static int converttoken(char *resultstri
 				for (i = cache_lru_last - 1; i > 0; i--) {
 					if (cache_lru_key_outputtype[i - 1] == outputtype) {
 						if (strcmp(cache_lru_key_token[i - 1], token) == 0) {
-							snprintf(resultstring, LINEBUFFER - 1, cache_lru_value[i - 1]);
+							snprintf(resultstring, LINEBUFFER - 1, "%s", cache_lru_value[i - 1]);
 							cache_lru_statistics[cache_lru_last - i]++;
 							if (ipv6calc_debug & 0x4) {
 								fprintf(stderr, "LRU cache: hit line=%d key_token=%s key_outputtype=%lx value=%s\n", i - 1, token, outputtype, resultstring);
@@ -405,7 +405,7 @@ static int converttoken(char *resultstri
 				for (i = cache_lru_max; i > cache_lru_last; i--) {
 					if (cache_lru_key_outputtype[i - 1] == outputtype) {
 						if (strcmp(cache_lru_key_token[i - 1], token) == 0) {
-							snprintf(resultstring, LINEBUFFER - 1, cache_lru_value[i - 1]);
+							snprintf(resultstring, LINEBUFFER - 1, "%s", cache_lru_value[i - 1]);
 							cache_lru_statistics[cache_lru_max - i + cache_lru_last]++;
 							if (ipv6calc_debug & 0x4) {
 								fprintf(stderr, "LRU cache: hit line=%d key_token=%s key_outputtype=%lx value=%s\n", i - 1, token, outputtype, resultstring);
@@ -464,7 +464,7 @@ static int converttoken(char *resultstri
 	switch (outputtype) {
 		case FORMAT_addrtype:
 			if (ipv6addr.flag_valid == 1) {
-				snprintf(resultstring, LINEBUFFER - 1, "ipv6-addr.addrtype.ipv6calc");
+				snprintf(resultstring, LINEBUFFER - 1, "%s", "ipv6-addr.addrtype.ipv6calc");
 
 				/* check for registry */
 				typeinfo = ipv6addr_gettype(&ipv6addr);
@@ -679,9 +679,9 @@ static int converttoken(char *resultstri
 		};
 
 		/* store key and value */
-		snprintf(cache_lru_key_token[cache_lru_last - 1], NI_MAXHOST - 1, token);
+		snprintf(cache_lru_key_token[cache_lru_last - 1], NI_MAXHOST - 1, "%s", token);
 		cache_lru_key_outputtype[cache_lru_last - 1] = outputtype;
-		snprintf(cache_lru_value[cache_lru_last - 1], NI_MAXHOST - 1, resultstring);
+		snprintf(cache_lru_value[cache_lru_last - 1], NI_MAXHOST - 1, "%s", resultstring);
 		if (ipv6calc_debug & 0x4) {
 			fprintf(stderr, "LRU cache: fill line=%d key_token=%s key_outputtype=%lx value=%s\n", cache_lru_last - 1, cache_lru_key_token[cache_lru_last - 1], cache_lru_key_outputtype[cache_lru_last - 1], cache_lru_value[cache_lru_last - 1]);
 		};