1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2024-12-23 01:55:49 -05:00

xlxd version 1.4.3

Protection against sid=0
This commit is contained in:
LX3JL 2017-04-13 17:34:58 +02:00
parent 76dc7d1ecf
commit 55b75a7c6f
2 changed files with 44 additions and 35 deletions

View File

@ -173,6 +173,9 @@ CPacketStream *CReflector::OpenStream(CDvHeaderPacket *DvHeader, CClient *client
// clients MUST have bee locked by the caller
// so we can freely access it within the fuction
// check if streamid is valid
if ( DvHeader->GetStreamId() != 0 )
{
// check if client is valid candidate
if ( m_Clients.IsClient(client) && !client->IsAMaster() )
{
@ -220,6 +223,12 @@ CPacketStream *CReflector::OpenStream(CDvHeaderPacket *DvHeader, CClient *client
<< " with sid " << DvHeader->GetStreamId() << std::endl;
}
}
}
else
{
// report
std::cout << "Detected null stream id for client " << client->GetCallsign() << std::endl;
}
// done
return retStream;

View File

@ -48,7 +48,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 4
#define VERSION_REVISION 2
#define VERSION_REVISION 3
// global ------------------------------------------------------