Commit e5a6880e authored by massiot's avatar massiot

* comm.c: Early termination for anonymous sockets.


git-svn-id: svn://svn.videolan.org/dvblast/trunk@28 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent 08e80a0b
...@@ -97,6 +97,11 @@ void comm_Read( void ) ...@@ -97,6 +97,11 @@ void comm_Read( void )
strerror(errno) ); strerror(errno) );
return; return;
} }
if ( sun_length == 0 || sun_length > sizeof(sun_client) )
{
msg_Err( NULL, "anonymous packet from comm socket\n" );
return;
}
if ( p_buffer[0] != COMM_HEADER_MAGIC ) if ( p_buffer[0] != COMM_HEADER_MAGIC )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment