change to behaviour the same as glibc for the check about buflen Change-Id: I98265a8fe441df6fed2527686f89b087364ca53d Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>