Fix buffer overflow.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4148 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
7318ddd70e
commit
da75ad9337
@ -655,7 +655,7 @@ void tf_ssb_connection_remove_new_message_request(tf_ssb_connection_t* connectio
|
||||
int index = tf_util_insert_index(author, connection->message_requests, connection->message_requests_count, sizeof(tf_ssb_connection_message_request_t), _message_request_compare);
|
||||
if (index < connection->message_requests_count && strcmp(author, connection->message_requests[index].author) == 0)
|
||||
{
|
||||
memmove(connection->message_requests + index, connection->message_requests + index + 1, sizeof(tf_ssb_connection_message_request_t) * (connection->message_requests_count - index));
|
||||
memmove(connection->message_requests + index, connection->message_requests + index + 1, sizeof(tf_ssb_connection_message_request_t) * (connection->message_requests_count - index - 1));
|
||||
connection->message_requests_count--;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user