Fix buffersize may smaller than the input files
am: 4141918995

Change-Id: I08511b8d6e872cbf506aa8ab46bc5fd5d39370d3