fix calls to krb5_net_{read,write}
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3910 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -48,15 +48,14 @@ krb5_read_message (krb5_context context,
|
||||
krb5_error_code ret;
|
||||
u_int32_t len;
|
||||
u_int8_t buf[4];
|
||||
int fd = *((int *)p_fd);
|
||||
|
||||
if (krb5_net_read (context, fd, buf, 4) != 4)
|
||||
if (krb5_net_read (context, p_fd, buf, 4) != 4)
|
||||
return errno;
|
||||
len = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
|
||||
ret = krb5_data_alloc (data, len);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (krb5_net_read (context, fd, data->data, len) != len) {
|
||||
if (krb5_net_read (context, p_fd, data->data, len) != len) {
|
||||
krb5_data_free (data);
|
||||
return errno;
|
||||
}
|
||||
|
Reference in New Issue
Block a user