[PATCH 4.15 160/202] pipe: fix off-by-one error when checking buffer limits