is there any case in with the ```buf != null``` and ```length != 0```?