Respective variables are unsigned and cannot be <0.
sapi/litespeed/lsapilib.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index 2e60701..20279d1 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -1442,16 +1442,16 @@ int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen, in
char * pBufCur = pBuf;
char * pCur;
char * p;
- if (!pReq || (pReq->m_fd ==-1) ||( !pBuf )||(bufLen < 0 )|| !getLF )
-
if (!pReq || (pReq->m_fd ==-1) ||( !pBuf )|| !getLF )
return -1;
*getLF = 0;
while( (left = pBufEnd - pBufCur ) > 0 )
{len = pReq->m_bufRead - pReq->m_bufProcessed;
-
if ( len <= 0 )
-
if ( len = 0 ) {
-
if ( (len = readBodyToReqBuf( pReq )) <= 0 )
-
if ( (len = readBodyToReqBuf( pReq )) = 0 ) { *getLF = 1; break;
@@ -1486,7 +1486,7 @@ ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen )
ssize_t len;
off_t total;
/* char *pOldBuf = pBuf; */
- if (!pReq || (pReq->m_fd ==-1) || ( !pBuf )||(bufLen < 0 ))
-
if (!pReq || (pReq->m_fd ==-1) || ( !pBuf ))
return -1;total = pReq->m_reqBodyLen - pReq->m_reqBodyRead;
@@ -1517,7 +1517,7 @@ ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen )
pBuf += len;
bufLen -= len;
}
-
else if ( len <= 0 )
-
else if ( len = 0 ) { if ( !total) return -1;
--
1.9.1
Respective variables are unsigned and cannot be <0.
Did you mean to use “==“ in comparisons?
sapi/litespeed/lsapilib.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index 2e60701..20279d1 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -1442,16 +1442,16 @@ int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen, in
char * pBufCur = pBuf;
char * pCur;
char * p;
- if (!pReq || (pReq->m_fd ==-1) ||( !pBuf )||(bufLen < 0 )|| !getLF )
if (!pReq || (pReq->m_fd ==-1) ||( !pBuf )|| !getLF )
return -1;
*getLF = 0;
while( (left = pBufEnd - pBufCur ) > 0 )
{len = pReq->m_bufRead - pReq->m_bufProcessed;
if ( len <= 0 )
if ( len = 0 ) {
if ( (len = readBodyToReqBuf( pReq )) <= 0 )
if ( (len = readBodyToReqBuf( pReq )) = 0 ) { *getLF = 1; break;
@@ -1486,7 +1486,7 @@ ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen )
ssize_t len;
off_t total;
/* char *pOldBuf = pBuf; */
- if (!pReq || (pReq->m_fd ==-1) || ( !pBuf )||(bufLen < 0 ))
- if (!pReq || (pReq->m_fd ==-1) || ( !pBuf ))
return -1;total = pReq->m_reqBodyLen - pReq->m_reqBodyRead;
@@ -1517,7 +1517,7 @@ ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen )
pBuf += len;
bufLen -= len;
}
else if ( len <= 0 )
else if ( len = 0 ) { if ( !total) return -1;
--
1.9.1--
--
Alexey Zakhlestin
CTO at Grids.by/you
https://github.com/indeyets
PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc
Respective variables are unsigned and cannot be <0.
Did you mean to use “==“ in comparisons?
Yes.
Fixed it in the pull request:
https://github.com/MegaManSec/php-src/commit/eba0e0348e972219675e48356bd5e74dacb04522
--
-- Joshua Rogers <https://internot.info/