Skip to content

gsocks5proxy: Handle EOF when reading from a stream

Benjamin Berg requested to merge bberg/glib:benzea/fix-socks-eof into master

The code did not handle EOF (0 byte read) correctly. This can e.g. cause an infinite loop if an incorrect socks proxy is configured.

Add the appropriate checks and return an G_IO_ERROR_CONNECTION_CLOSED error if EOF is encountered.


So yeah, I accidentally put an HTTPS proxy into the SOCKS field. The result were 3 processes just spinning CPU here (2x webkitgtk + gsd-print-notifications). Not nice, but I think this should solve it.

Merge request reports