From fdea64c0d6add8535a1e3fc18dfa105907144cfc Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 3 Dec 2012 00:05:06 +0100 Subject: [PATCH] RemotePlugin: more sanity checks --- include/RemotePlugin.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/RemotePlugin.h b/include/RemotePlugin.h index 347536b4b..5e03a724a 100644 --- a/include/RemotePlugin.h +++ b/include/RemotePlugin.h @@ -415,7 +415,8 @@ private: return; } lock(); - while( _len > m_data->endPtr - m_data->startPtr ) + while( isInvalid() == false && + _len > m_data->endPtr - m_data->startPtr ) { unlock(); #ifndef LMMS_BUILD_WIN32 @@ -436,7 +437,7 @@ private: void write( const void * _buf, int _len ) { - if( isInvalid() ) + if( isInvalid() || _len > SHM_FIFO_SIZE ) { return; }