Changed circular_buffer_read and circular_buffer_peek functions to transfer  bytes from the circular buffer to the destination buffer rather than the maximum allowable length . This prevents a buffer overflow error.