Skip to content
Snippets Groups Projects
Commit a10f5b34 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Revert "security.c: buffer_read various fixes."

This reverts commit fbb38de4.
parent b1df37c6
No related branches found
No related tags found
No related merge requests found
......@@ -223,13 +223,11 @@ static CURLcode read_data(struct connectdata *conn,
}
static size_t
buffer_read(struct krb4buffer *buf, const char *data, size_t len)
buffer_read(struct krb4buffer *buf, void *data, size_t len)
{
size_t buf_capacity = buf->size - buf->index;
DEBUGASSERT(buf->size > buf->index);
if(buf_capacity < len)
len = buf_capacity;
memcpy(buf, data, len);
if(buf->size - buf->index < len)
len = buf->size - buf->index;
memcpy(data, (char*)buf->data + buf->index, len);
buf->index += len;
return len;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment