bool_t
xdr_krb5_keyblock(XDR *xdrs, krb5_keyblock *objp)
{
+ char *cp;
+
/* XXX This only works because free_keyblock assumes ->contents
is allocated by malloc() */
-
if(!xdr_krb5_enctype(xdrs, &objp->enctype))
return FALSE;
- if(!xdr_bytes(xdrs, (char **) &objp->contents, (unsigned int *)
- &objp->length, ~0))
+ cp = (char *)objp->contents;
+ if(!xdr_bytes(xdrs, &cp, &objp->length, ~0))
return FALSE;
+ objp->contents = (uint8_t *)cp;
return TRUE;
}
bool_t result;
/* Fix type mismatches between APIs. */
unsigned int length = buf->length;
- result = xdr_bytes(xdrs, (char **) &buf->value, &length,
+ char *cp = buf->value;
+ result = xdr_bytes(xdrs, &cp, &length,
(xdrs->x_op == XDR_DECODE && buf->value == NULL)
? (unsigned int) -1 : (unsigned int) buf->length);
+ buf->value = cp;
buf->length = length;
return result;
}
XDR temp_xdrs;
int conf_state;
unsigned int length;
+ char *cp;
PRINTF(("gssapi_wrap_data: starting\n"));
/* write the token */
length = out_buf.length;
- if (! xdr_bytes(out_xdrs, (char **) &out_buf.value,
- (unsigned int *) &length,
- out_buf.length)) {
+ cp = out_buf.value;
+ if (! xdr_bytes(out_xdrs, &cp, &length, out_buf.length)) {
PRINTF(("gssapi_wrap_data: serializing encrypted data failed\n"));
XDR_DESTROY(&temp_xdrs);
return FALSE;
}
+ out_buf.value = cp;
*major = gss_release_buffer(minor, &out_buf);
uint32_t verf_seq_num;
int conf, qop;
unsigned int length;
+ char *cp;
PRINTF(("gssapi_unwrap_data: starting\n"));
in_buf.value = NULL;
out_buf.value = NULL;
- if (! xdr_bytes(in_xdrs, (char **) &in_buf.value,
- &length, (unsigned int) -1)) {
+ cp = in_buf.value;
+ if (! xdr_bytes(in_xdrs, &cp, &length, (unsigned int) -1)) {
PRINTF(("gssapi_unwrap_data: deserializing encrypted data failed\n"));
temp_xdrs.x_op = XDR_FREE;
- (void)xdr_bytes(&temp_xdrs, (char **) &in_buf.value, &length,
- (unsigned int) -1);
+ (void)xdr_bytes(&temp_xdrs, &cp, &length, (unsigned int) -1);
+ in_buf.value = NULL;
return FALSE;
}
+ in_buf.value = cp;
in_buf.length = length;
*major = gss_unseal(minor, context, &in_buf, &out_buf, &conf,
{
bool_t xdr_stat;
u_int tmplen;
+ char *cp;
if (xdrs->x_op != XDR_DECODE) {
if (buf->length > UINT_MAX)
else
tmplen = buf->length;
}
- xdr_stat = xdr_bytes(xdrs, (char **)&buf->value, &tmplen, maxsize);
+ cp = buf->value;
+ xdr_stat = xdr_bytes(xdrs, &cp, &tmplen, maxsize);
+ buf->value = cp;
if (xdr_stat && xdrs->x_op == XDR_DECODE)
buf->length = tmplen;