The phone is working properly so far, the sound is clean with or without earphones.
What do you think may go wrong ?
There's a risk of whatever's happening continuing and affect the signal to the earbuds. I would be more concerned about what's happening in the other direction. iPhones are not sealed so whatever was in the jack is also probably in the phone.
I also notice there is a significant deformation in the metal band (antenna). It's clear this phone has not been taken care of very well. However, life happens and if you believe the price is fair for a damaged phone that's between you and your friend. Personally, I wouldn't touch this one but everyone's situation is different. Be prepared for the awkward moment between you and your friend when the phone stops working. Will you expect a refund?
If you are able to, you could get a Genius appointment and see if they would run their diagnostics on it to see if all the components are OK. Without treatment that could damage the phone further the corrosion may not stop.
http://support.apple.com/kb/ht3302