From: APTX Date: Tue, 28 Feb 2012 19:43:29 +0000 (+0100) Subject: Make sure there's enough parts to read from. X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=52f40bbf4fb4313c216f44911669b579153095ff;p=anidbudpclient.git Make sure there's enough parts to read from. --- diff --git a/mylistcommand.cpp b/mylistcommand.cpp index 8ec475f..72bcf5b 100644 --- a/mylistcommand.cpp +++ b/mylistcommand.cpp @@ -308,6 +308,11 @@ void MyListReply::setRawReply(ReplyCode replyCode, const QString &reply) case MYLIST: { QStringList parts = reply.mid(reply.indexOf("\n")).split('|', QString::KeepEmptyParts); + if (parts.count() < 12) + { + signalReplyReady(false); + break; + } bool ok; m_lid = parts[0].toInt(&ok, 10); m_fid = parts[1].toInt(&ok, 10);