If the User-Password has zero length, encrypt 16 bytes of zero.
authoraland <aland>
Fri, 21 May 2004 14:40:39 +0000 (14:40 +0000)
committeraland <aland>
Fri, 21 May 2004 14:40:39 +0000 (14:40 +0000)
Bug #68

src/lib/radius.c

index d21d7be..0c0ba78 100644 (file)
@@ -1698,6 +1698,10 @@ int rad_pwencode(char *passwd, int *pwlen, const char *secret,
                for (i = len; n > 0; n--, i++)
                        passwd[i] = 0;
                len = *pwlen = i;
+
+       } else if (len == 0) {
+               memset(passwd, 0, AUTH_PASS_LEN);
+               *pwlen = len = AUTH_PASS_LEN;
        }
 
        /*