You "figured a way around [the guard that prevents you from shooting yourself in the foot]" and you "created the pointer [that SDL was responsible for creating and not you]"?
Lumpkin: You are sounding alarm bells in my brain. It sounds like what you are doing is terrible and very dangerous/unstable. I strongly recommend you reconsider your approach.
You should not be finding ways around the API. You must work within what the API allows.
I need. I had to set the data.
You can set pixel data with SDL_Surface's API. You should not need to circumvent it.