bipbuffer icon indicating copy to clipboard operation
bipbuffer copied to clipboard

Bug in bb_read() in case of cross-section read

Open sdon1011 opened this issue 4 years ago • 1 comments

In the code:

// read another part
memcpy((char *)dst+have_read, bip->data+reader->start, size - have_read);
have_read = size;

reader->start += size;

reader->start is incremented with size instead of being incremented with (size - have_read) as in the memcpy().

sdon1011 avatar Mar 09 '21 08:03 sdon1011

thanks sdon1011, since this repository hasn't been maintained for so long, it would take some time for me to help you. by the way, this repository should no be used with further testing.

On Tue, Mar 9, 2021 at 4:25 PM sdon1011 @.***> wrote:

In the code:

` // read another part memcpy((char *)dst+have_read, bip->data+reader->start, size - have_read); have_read = size;

reader->start += size;`

reader->start is incremented with size instead of being incremented with (size - have_read) as in the memcpy().

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DanteLee/bipbuffer/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2PXRDKYE7YR3Q74CBH7ZDTCXLPZANCNFSM4Y3BKLUA .

c0x0o avatar Mar 15 '21 15:03 c0x0o