If you purchase an existing building, who owns the land under/over the footings on the side of the adjacent owner where the matter of the boundary has not been agreed?

I bought a shed from and adjoining neighbour which I intend to re-build as a garage, but which largely matches the existing with overhanging rainwater goods, and drainage that runs through the neighbour’s land. What is my entitlement in terms of oversailing their land and to what extent would I be doing so?