LP #821706: pt-query-digest --watch-server may crash

Description

**Reported in Launchpad by Daniel Nichter last update 04-02-2013 17:17:40

Imported from http://code.google.com/p/maatkit/issues/detail?id=1202

Quoting the original:

The problem is in ProtocolParser::_get_session(): this sub will return early if the server in the packet doesn't match --watch-server. Then in _parse_packet() we have:

if ( $packet_from eq 'server' ) {

but $packet_from will be undef if _get_session() returned early. Fix: check retval of _get_session().

Environment

None

Smart Checklist

Activity

Show:

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 5:55 PM
Updated December 21, 2019 at 2:32 PM