[uClibc]encrypt segfault

Joseph_Bester at alumni.hmc.edu Joseph_Bester at alumni.hmc.edu
Tue Feb 19 15:41:51 UTC 2002


Hi all,

I tried building the PoPToP VPN tools with uClibc. After some tweaking,
it compiled, but I consistently got a segmentation fault (in the mppe-enabled
version of pppd) in the encrypt() library call in uClibc.

The crash was due to the function f() in des.c trying to transpose using a NULL
array (data->EP). I've attached a patch which *I think* fixes the problem.
Someone with a better understanding of DES may want to check my choice
of the transposition array---this was done based on a really quick reading of
one of my old textbooks' description of the algorithm.

joe
-------------- next part --------------
diff -u -r uClibc-0.9.9.orig/libcrypt/des.c uClibc-0.9.9/libcrypt/des.c
--- uClibc-0.9.9.orig/libcrypt/des.c	Wed Dec 19 10:53:00 2001
+++ uClibc-0.9.9/libcrypt/des.c	Sat Feb 16 11:54:03 2002
@@ -223,6 +223,7 @@
 	int i;
 
 	transpose(p, &InitialTr, 64);
+	data->EP = &etr;
 	for (i = 15; i>= 0; i--) {
 		int j = edflag ? i : 15 - i;
 		int k;


More information about the uClibc mailing list