Bug fix in select of miniserver.c

Fix a bug in miniserver.c, in which maxMiniSock was wrongly declared as
unsigned int and as a result it was beeng set to ((unsigned int)(-1)).
As a result, after beeing incremented, it became zero, and this value
was beeing used in the select() call.

Thanks to Fabrice Fontaine for helping and testing with this issue.
This commit is contained in:
Marcelo Roberto Jimenez 2010-10-19 15:49:36 -02:00
parent 923eee2393
commit 2bdc9e075e
2 changed files with 11 additions and 1 deletions

View File

@ -2,6 +2,16 @@
Version 1.6.8
*******************************************************************************
2010-10-15 Marcelo Roberto Jimenez <mroberto(at)users.sourceforge.net>
Bug fix in select of miniserver.c
Fix a bug in miniserver.c, in which maxMiniSock was wrongly declared as
unsigned int and as a result it was beeng set to ((unsigned int)(-1)).
As a result, after beeing incremented, it became zero, and this value
was beeing used in the select() call.
Thanks to Fabrice Fontaine for helping and testing with this issue.
*******************************************************************************
Version 1.6.7

View File

@ -390,7 +390,7 @@ static void RunMiniServer(
char errorBuffer[ERROR_BUFFER_LEN];
fd_set expSet;
fd_set rdSet;
unsigned int maxMiniSock;
int maxMiniSock;
int ret = 0;
int stopSock = 0;