Tae Davis, Notre Dame escape halftime hole, beat Buffalo