Yup, socks.c should be now fixed. I was thinking about removing it in a future and use only an external SOCKS library, but (uhm) can't find any with a proper project's home page and being completely free (GPL/LGPL). Am I googling wrong? For instance, Fetchmail supports some SOCKS libraries, but doesn't say anything about their source.