for bug #241, limit the buffer for input chunk size.