Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 567608 | Differences between
and this patch

Collapse All | Expand All

(-)a/patchsets/skey/1.1.5/01_all_gentoo.patch (-15 / +18 lines)
Lines 7-12 Updated skeyinfo.c and skey.3 from newer NetBSD version, which is Link Here
7
under a 2-clause BSD license. Removed some whitespace changes.
7
under a 2-clause BSD license. Removed some whitespace changes.
8
	(05 Jan 2012) -ulm@gentoo.org
8
	(05 Jan 2012) -ulm@gentoo.org
9
9
10
Revert btoe() to the OpenBSD version, in order to avoid reading
11
beyond array bounds, bug 567608.
12
	(05 Dec 2015) -hanno@gentoo.org
13
10
--- skey-1.1.5.orig/CHANGES	2001-05-10 17:10:49.000000000 +0100
14
--- skey-1.1.5.orig/CHANGES	2001-05-10 17:10:49.000000000 +0100
11
+++ skey-1.1.5/CHANGES	2003-11-06 17:46:45.000000000 +0000
15
+++ skey-1.1.5/CHANGES	2003-11-06 17:46:45.000000000 +0000
12
@@ -1,6 +1,19 @@
16
@@ -1,6 +1,19 @@
Lines 1036-1042 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1036
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/skeyinfo.1
1040
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/skeyinfo.1
1037
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/skeyinit.1
1041
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/skeyinit.1
1038
--- skey-1.1.5.orig/put.c	2001-05-10 17:10:49.000000000 +0100
1042
--- skey-1.1.5.orig/put.c	2001-05-10 17:10:49.000000000 +0100
1039
+++ skey-1.1.5/put.c	2003-11-06 17:46:45.000000000 +0000
Lines 1059-1065 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1059
 	"A",
1063
 	"A",
1060
 	"ABE",
1064
 	"ABE",
1061
 	"ACE",
1065
 	"ACE",
1062
@@ -2079,19 +2079,13 @@
1066
@@ -2079,10 +2079,7 @@
1063
 /* Encode 8 bytes in 'c' as a string of English words.
1067
 /* Encode 8 bytes in 'c' as a string of English words.
1064
  * Returns a pointer to a static buffer
1068
  * Returns a pointer to a static buffer
1065
  */
1069
  */
Lines 1069-1088 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1069
-	char *engout;
1073
-	char *engout;
1070
+char *btoe(char *engout, const char *c)
1074
+char *btoe(char *engout, const char *c)
1071
 {
1075
 {
1072
-	char cp[10];	/* add in room for the parity 2 bits + extract() slop */
1076
 	char cp[10];	/* add in room for the parity 2 bits + extract() slop */
1073
+	char cp[9];	/* add in room for the parity 2 bits */
1074
 	int p, i;
1077
 	int p, i;
1075
 
1078
@@ -2090,8 +2087,8 @@
1076
 	engout[0] = '\0';
1079
 	engout[0] = '\0';
1077
-
1080
 
1078
-	/* workaround for extract() reads beyond end of data */
1081
 	/* workaround for extract() reads beyond end of data */
1079
-	(void)memset(cp, 0, sizeof(cp));
1082
-	(void)memset(cp, 0, sizeof(cp));
1080
-	(void)memcpy(cp, c, 8);
1083
-	(void)memcpy(cp, c, 8);
1084
+	memset(cp, 0, sizeof(cp));
1081
+	memcpy(cp, c, 8);
1085
+	memcpy(cp, c, 8);
1082
 
1086
 
1083
 	/* compute parity */
1087
 	/* compute parity */
1084
 	for (p = 0, i = 0; i < 64; i += 2)
1088
 	for (p = 0, i = 0; i < 64; i += 2)
1085
@@ -2099,20 +2093,20 @@
1089
@@ -2099,20 +2096,20 @@
1086
 
1090
 
1087
 	cp[8] = (char)p << 6;
1091
 	cp[8] = (char)p << 6;
1088
 
1092
 
Lines 1115-1121 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1115
 #endif
1119
 #endif
1116
 	return(engout);
1120
 	return(engout);
1117
 }
1121
 }
1118
@@ -2123,41 +2117,42 @@
1122
@@ -2123,41 +2120,42 @@
1119
  *        -1 badly formed in put ie > 4 char word
1123
  *        -1 badly formed in put ie > 4 char word
1120
  *        -2 words OK but parity is wrong
1124
  *        -2 words OK but parity is wrong
1121
  */
1125
  */
Lines 1178-1184 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1178
 
1182
 
1179
 		insert(b, v, p, 11);
1183
 		insert(b, v, p, 11);
1180
 	}
1184
 	}
1181
@@ -2167,55 +2162,47 @@
1185
@@ -2167,55 +2165,47 @@
1182
 		p += extract (b, i, 2);
1186
 		p += extract (b, i, 2);
1183
 
1187
 
1184
 	if ((p & 3) != extract (b, 64, 2)) 
1188
 	if ((p & 3) != extract (b, 64, 2)) 
Lines 1245-1251 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1245
 {
1249
 {
1246
 	int i, j;
1250
 	int i, j;
1247
 
1251
 
1248
@@ -2223,18 +2210,18 @@
1252
@@ -2223,18 +2213,18 @@
1249
 		i = (low + high) / 2;
1253
 		i = (low + high) / 2;
1250
 
1254
 
1251
 		if ((j = strncmp(w, Wp[i], 4)) == 0)
1255
 		if ((j = strncmp(w, Wp[i], 4)) == 0)
Lines 1270-1276 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1270
 		if (j < 0)
1274
 		if (j < 0)
1271
 			high = i;	/* Search lower half */
1275
 			high = i;	/* Search lower half */
1272
 		else
1276
 		else
1273
@@ -2242,12 +2229,7 @@
1277
@@ -2242,12 +2232,7 @@
1274
 	}
1278
 	}
1275
 }
1279
 }
1276
 
1280
 
Lines 1284-1290 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1284
 {
1288
 {
1285
 	unsigned char cl;
1289
 	unsigned char cl;
1286
 	unsigned char cc;
1290
 	unsigned char cc;
1287
@@ -2261,25 +2243,28 @@
1291
@@ -2261,25 +2246,28 @@
1288
 	assert(start + length <= 66);
1292
 	assert(start + length <= 66);
1289
 
1293
 
1290
 	shift = ((8 - ((start + length) % 8)) % 8);
1294
 	shift = ((8 - ((start + length) % 8)) % 8);
Lines 1320-1326 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1320
 {
1324
 {
1321
 	while (*word) {
1325
 	while (*word) {
1322
 		if (!isascii(*word))
1326
 		if (!isascii(*word))
1323
@@ -2297,11 +2282,7 @@
1327
@@ -2297,11 +2285,7 @@
1324
 }
1328
 }
1325
 
1329
 
1326
 /* Extract 'length' bits from the char array 's' starting with bit 'start' */
1330
 /* Extract 'length' bits from the char array 's' starting with bit 'start' */
Lines 1333-1339 under a 2-clause BSD license. Removed some whitespace changes. Link Here
1333
 {
1337
 {
1334
 	unsigned char cl;
1338
 	unsigned char cl;
1335
 	unsigned char cc;
1339
 	unsigned char cc;
1336
@@ -2320,5 +2301,5 @@
1340
@@ -2320,5 +2304,5 @@
1337
 	x = x >> (24 - (length + (start % 8)));
1341
 	x = x >> (24 - (length + (start % 8)));
1338
 	x = (x & (0xffff >> (16 - length)));
1342
 	x = (x & (0xffff >> (16 - length)));
1339
 
1343
 
(-)a/patchsets/skey/1.1.5/06_all_binary-search.patch (-2 / +1 lines)
Lines 2-8 Fix binary search. Link Here
2
2
3
--- skey-1.1.5-orig/put.c
3
--- skey-1.1.5-orig/put.c
4
+++ skey-1.1.5/put.c
4
+++ skey-1.1.5/put.c
5
@@ -2206,27 +2206,17 @@
5
@@ -2209,27 +2209,17 @@
6
 {
6
 {
7
 	int i, j;
7
 	int i, j;
8
 
8
 
9
- 

Return to bug 567608