pkgsrc/security/zoneminder/patches/patch-web_ajax_stream_php

15 lines
558 B
Text

$NetBSD: patch-web_ajax_stream_php,v 1.2 2013/03/24 16:47:47 joerg Exp $
http://www.zoneminder.com/forums/viewtopic.php?t=13322
--- web/ajax/stream.php.orig 2011-06-27 11:14:00.000000000 +0000
+++ web/ajax/stream.php
@@ -60,7 +60,7 @@ $wSockets = NULL;
$eSockets = NULL;
$numSockets = @socket_select( $rSockets, $wSockets, $eSockets, intval(MSG_TIMEOUT/1000), (MSG_TIMEOUT%1000)*1000 );
-if ( $numSockets === false )
+if ( $numSockets === false || $numSockets < 0)
{
ajaxError( "socket_select failed: ".socket_strerror(socket_last_error()) );
}