Obviously it should read data into the free region of buffer. The "free" pointer is respectively shifted in the code below.