Roi of a shared_ptr<mat> is not correct

cv::Mat img_whole { 800, 5120, CV_8UC1 };
cv::Mat img1 { img_whole, cv::Range(0, 800), cv::Range(0, 1280) };
// ...

img1 is a view into img_whole. data can be altered through either of them.