next_pos() returns the grid end sentinel when a placement completes the board. Avoid passing that sentinel to largest_square(), which requires an in-range position and otherwise reads past the grid.
Tests: Debug, Release, ASan, and UBSan CTest suites
Refs: #14
Exercise both the trivial order-1 solution and the feasible order-8 solution through the independent placement validator.
With the existing completion ordering, the focused test reports a heap-buffer-overflow under AddressSanitizer before validation can run.
Refs: #14