]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 4004 partial: Fix segfault via Ftp::Client::readControlReply
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 30 Nov 2016 21:56:30 +0000 (10:56 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 30 Nov 2016 21:56:30 +0000 (10:56 +1300)
commit0006bfd77f816fb48c04ebe01468e20ae99041de
tree3d73fdb0ce2f09e2ab52138a74159500fb8d3d50
parentea79ecb850c2eb190a50ed58de961b8df2fae318
Bug 4004 partial: Fix 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