add minimum buffer size
Merge pull request #854 from sijchen/bufferlencheck_fix

It is OK for this bug