Robert Shearman rob@codeweavers.com writes:
if (strncmpiW(pszAuthValue, szBasic, sizeof(szBasic)/sizeof(szBasic[0])-1))
{
When using strncmp you need to also check that you reached the end of the first string.
- /* compare against last character to be set to avoid a race */
- if (HTTP_Base64Dec['/'] != 63)
- {
This won't avoid the race, you'll still get garbage if two threads get here at the same time.