bufgetdata(): fix the available vs. required check.