Add memory check for srcBasePtr & dstBasePtr