Simplify baddbytes() in buffer