Save 'bytes read' to the length parameter