One more security fix (check size of QList before using QList::operator[])
authorunc0rr
Sat, 18 Aug 2007 15:16:03 +0000
changeset 575 9a18a9b9d7d4
parent 574 1cafd9eb1a21
child 576 35a1af355ada
One more security fix (check size of QList before using QList::operator[])
QTfrontend/chatwidget.cpp
--- a/QTfrontend/chatwidget.cpp	Sat Aug 18 12:35:10 2007 +0000
+++ b/QTfrontend/chatwidget.cpp	Sat Aug 18 15:16:03 2007 +0000
@@ -57,6 +57,7 @@
 
 void HWChatWidget::onChatStringFromNet(const QStringList& str)
 {
+  if (str.size() < 2) return;
   QListWidget* w=chatText;
   w->addItem(str[0]+": "+str[1]);
   w->scrollToBottom();