From ea8acf3bbd4caa7588221fb243438cb4097ef380 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Fri, 15 Jan 2016 09:44:10 +0300 Subject: [PATCH] Fix unitialized scalar field bugs --- src/base/bittorrent/torrentcreatorthread.cpp | 3 +++ src/base/net/smtp.cpp | 1 + src/webui/abstractwebapplication.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/base/bittorrent/torrentcreatorthread.cpp b/src/base/bittorrent/torrentcreatorthread.cpp index 548836500..ea82c44e1 100644 --- a/src/base/bittorrent/torrentcreatorthread.cpp +++ b/src/base/bittorrent/torrentcreatorthread.cpp @@ -60,6 +60,9 @@ bool fileFilter(const std::string &f) TorrentCreatorThread::TorrentCreatorThread(QObject *parent) : QThread(parent) + , m_private(false) + , m_pieceSize(0) + , m_abort(false) { } diff --git a/src/base/net/smtp.cpp b/src/base/net/smtp.cpp index e232beeb4..23485e18f 100644 --- a/src/base/net/smtp.cpp +++ b/src/base/net/smtp.cpp @@ -96,6 +96,7 @@ Smtp::Smtp(QObject *parent) : QObject(parent) , m_state(Init) , m_useSsl(false) + , m_authType(AuthPlain) { #ifndef QT_NO_OPENSSL m_socket = new QSslSocket(this); diff --git a/src/webui/abstractwebapplication.cpp b/src/webui/abstractwebapplication.cpp index 131dd2ee3..e9d88d754 100644 --- a/src/webui/abstractwebapplication.cpp +++ b/src/webui/abstractwebapplication.cpp @@ -68,6 +68,7 @@ struct WebSession WebSession(const QString& id) : id(id) { + updateTimestamp(); } void updateTimestamp() @@ -349,7 +350,6 @@ bool AbstractWebApplication::sessionStart() { if (session_ == 0) { session_ = new WebSession(generateSid()); - session_->updateTimestamp(); sessions_[session_->id] = session_; QNetworkCookie cookie(C_SID, session_->id.toUtf8());