Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I00a6be53c4519937ac900560c669587921990821
head_pos = start - c->start_byte;
fs[0].data = c->data + head_pos;
head_pos = start - c->start_byte;
fs[0].data = c->data + head_pos;
- fs[0].len = clib_min (c->length - head_pos, cursize - offset);
+ fs[0].len = clib_min (c->length - head_pos, to_read);
n_bytes = fs[0].len;
while (n_bytes < to_read && fs_index < n_segs)
n_bytes = fs[0].len;
while (n_bytes < to_read && fs_index < n_segs)