mixup means there's a 1 in 256 chance the server will get it wrong.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4651
dc483132-0cff-0310-8789-
dd5450dbe970
Tue Nov 8 01:39:50 1994 Theodore Y. Ts'o (tytso@dcl)
+ * kerberos.c (kerberos4_is): Fix bug in logic of incrementing the
+ received challenge. A ++/-- mixup means there's a 1 in
+ 256 chance the server will get it wrong.
+
* kerberos.c: Use des_init_random_number_genator(), since that
will result in different subsession keys on successive
runs of telnet.
* increment by one, re-encrypt it and send it back.
*/
des_ecb_encrypt(datablock, challenge, sched, 0);
- for (r = 7; r >= 0; r++) {
+ for (r = 7; r >= 0; r--) {
register int t;
t = (unsigned int)challenge[r] + 1;
challenge[r] = t; /* ignore overflow */