Handle premature end of input.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@544 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -204,7 +204,10 @@ int krb4_read(int fd, void *data, int length)
|
||||
}
|
||||
|
||||
while(length){
|
||||
krb_net_read(fd, &len, 4);
|
||||
if(krb_net_read(fd, &len, 4) < 4){
|
||||
reply(400, "Unexpected end of file.\n");
|
||||
return -1;
|
||||
}
|
||||
len = ntohl(len);
|
||||
krb_net_read(fd, data_buffer, len);
|
||||
if(data_protection == prot_safe)
|
||||
|
Reference in New Issue
Block a user