From c077091693d2b7d970d9ebf5ec3324382b1d3773 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 14 Jun 2015 09:08:09 +0000 Subject: [PATCH] fixed potential passing of deleted item to sendChatItem when a ChatLobbyItem is too big (would probably cause a crash. Found using coverity) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8428 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/chat/distributedchat.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/libretroshare/src/chat/distributedchat.cc b/libretroshare/src/chat/distributedchat.cc index 620886ec8..72ce1f63a 100644 --- a/libretroshare/src/chat/distributedchat.cc +++ b/libretroshare/src/chat/distributedchat.cc @@ -388,6 +388,7 @@ void DistributedChatService::checkSizeAndSendLobbyMessage(RsChatItem *msg) { std::cerr << "(EE) Chat item exceeds maximum serial size. It will be dropped." << std::endl; delete msg ; + return ; } sendChatItem(msg) ; }