Skip to content

Commit

Permalink
node sticky sessions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rramachand21-zz committed Feb 19, 2017
1 parent 8f9d43a commit 9b05ea4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/iisnode/cnodeprocessmanager.cpp
Expand Up @@ -135,11 +135,19 @@ int CNodeProcessManager::ExtractStickySessionsProcess( PCSTR pszCookie )
pEnd = pStart;
while (*pEnd) /* Works because end-of-string and FALSE are identical. */
{
if((pEnd - pStart) >= sizeof(acProcess))
{
break;
}
pEnd++;
}
}
memcpy(acProcess, pStart, pEnd - pStart); // copy result
return atoi(acProcess);

if((pEnd - pStart) < sizeof(acProcess))
{
memcpy(acProcess, pStart, pEnd - pStart); // copy result
return atoi(acProcess);
}
}
}
}
Expand Down

0 comments on commit 9b05ea4

Please sign in to comment.