Slight memcpy paranoia.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4713 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
c1890775dc
commit
9d1476a760
@ -230,9 +230,12 @@ static void _http_add_body_bytes(tf_http_connection_t* connection, const void* d
|
||||
{
|
||||
if (connection->is_websocket)
|
||||
{
|
||||
connection->body = tf_realloc(connection->body, connection->body_length + size);
|
||||
memcpy((char*)connection->body + connection->body_length, data, size);
|
||||
connection->body_length += size;
|
||||
if (size)
|
||||
{
|
||||
connection->body = tf_realloc(connection->body, connection->body_length + size);
|
||||
memcpy((char*)connection->body + connection->body_length, data, size);
|
||||
connection->body_length += size;
|
||||
}
|
||||
|
||||
while (connection->body_length >= 2)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user