netcatgui icon indicating copy to clipboard operation
netcatgui copied to clipboard

Accessing a member when object is already released

Open cellist opened this issue 3 years ago • 2 comments

In NcSessionListenWidget::hostConnectionError() you have:

hostDisconnect(); ... QMessageBox::critical( ... .arg(hostConnection->errorString()));

but hostDisconnect() already deallocates the hostConnection (i.e. QTcpSocket*), so you should not refer to its errorString() method() any longer.

cellist avatar Mar 29 '21 09:03 cellist

Thank you! I'll fix this if I ever get to doing a revamp for a new release; unless it crashes for you and makes netcatgui unusable for your use-case right now?

shinnok avatar Jun 06 '21 11:06 shinnok

Thank you for coming back to my issue and apologies for my late reply ... the bug does not hamper my use case very much, as the tool only crashes at the very end of that process.

cellist avatar Jul 27 '21 09:07 cellist