Changed circular_buffer_read and circular_buffer_peek functions to trans...

...fer  bytes from the circular buffer to the destination buffer rather than the maximum allowable length . This prevents a buffer overflow error.

Notice that these functons compute a `toread` variable (which is supposed to represent the number of bytes read from the circular buffer), but this value isn't actually used.  Instead, `len` is passed as the length argument to `memcpy` -- this seems to be a typo.