Your picture is out of focus, you may have to put the camera into macro mode (or close-up) to get that close. It's not obvious where the pipe ends or what material it is made of. Without that info, can't say. To be proper and not have leaks or smells, there has to be a continuous, unbroken, sealed connection between the toilet and the sewer. The flange must attach to the pipe and then be anchored to the floor. A better picture and some description of what's actually there is required.