Use an unsigned char buf as input
Fix sign extension issue

Found by Coverity Scan
Allow shorter inquiry responses

It is perfectly valid to get a short inquiry response, some disks may
actually respond like that.