]> git.ipfire.org Git - thirdparty/squid.git/commit
Segfault via Ftp::Client::readControlReply.
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 11 Nov 2016 16:14:16 +0000 (18:14 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 11 Nov 2016 16:14:16 +0000 (18:14 +0200)
commitef143ddc67151d2f8e7b466bbf091fc837701027
tree2fedface6851e91e719fb0725e51633ae1e67b61
parentec4011ac22c989161c09d24926283d4195c18719
Segfault via Ftp::Client::readControlReply.

Added nil dereference checks for Ftp::Client::ctrl.conn, including:
- Ftp::Client::handlePasvReply() and handleEpsvReply() that dereference
  ctrl.conn in DBG_IMPORTANT messages.
- Many functions inside FtpClient.cc and FtpGateway.cc files.

TODO: We need to find a better way to handle nil ctrl.conn. It is only
a matter of time when we forget to add another dereference check or
discover a place we missed during this change.

Also disabled forwarding of EPRT and PORT commands to origin servers.
Squid support for those commands is broken and their forwarding may
cause segfaults (bug #4004). Active FTP is still supported, of course.

This is a Measurement Factory project
src/clients/FtpClient.cc
src/clients/FtpGateway.cc