don't index into the buf until we know it exists