Handle different sizes of returned checksum.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@542 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -449,13 +449,18 @@ do_klogin(char *host)
|
|||||||
verbose = old_verbose;
|
verbose = old_verbose;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
memmove(&tmp, msg_data.app_data, 4);
|
{
|
||||||
tmp = ntohl(tmp);
|
/* the draft doesn't tell what size the return has */
|
||||||
if(tmp - checksum != 1){
|
int i;
|
||||||
|
u_int32_t cs = 0;
|
||||||
|
for(i = 0; i < msg_data.app_length; i++)
|
||||||
|
cs = (cs<<8) + msg_data.app_data[i];
|
||||||
|
if(cs - checksum != 1){
|
||||||
fprintf(stderr, "Bad checksum returned from server.");
|
fprintf(stderr, "Bad checksum returned from server.");
|
||||||
verbose = old_verbose;
|
verbose = old_verbose;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
auth_complete = 1;
|
auth_complete = 1;
|
||||||
verbose = old_verbose;
|
verbose = old_verbose;
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user