jech / polipo

The Polipo caching HTTP proxy
http://www.pps.jussieu.fr/~jch/software/polipo/
MIT License
1.8k stars 353 forks source link

Crash when starting with a build from master using socksAuthCredentials in config #86

Open DeadSix27 opened 8 years ago

DeadSix27 commented 8 years ago

I get this error:

$ sudo ./polipo
polipo: atom.c:187: releaseAtom: Assertion `atom->refcount >= 1 && atom->refcount < LARGE_ATOM_REFCOUNT' failed.
Aborted (core dumped)

Caused by config option: socksAuthCredentials = "x*******:H*********N"

I double checked whether its correctly formatted, but it is

"SOCKS4a (or SOCKS5) credentials username:password"

I had to use a git master build as I desperately need that feature (->socks5 parent auth)

EDIT: I checked again, and apparently in preinitSocks() the code goes into: else if (rc == 0) { // separator ':' not found

and rc is == 0 because in atomSplit() the code goes into p = memchr(atom->string, c, atom->length); if(p == NULL) <-- here

so memchr fails/is NULL @ that point causing the whole issue