Yeah, what HeelX said

Maybe you need a lawyer or paralegal if it's a big deal, otherwise maybe work it out yourselves and write out an agreement, make the deal at a notary public. But if you are selling your work to someone, I don't think there is a big risk to -you-, unless you are trying to protect some copywritten content that you do not want the person to use (and have any cause to otherwise need to protect yourself).. and maybe some kind of waiver to release you from responsibility for the code in case there are problems.