The implementation of the CString form of CHttpFile::QueryInfo() calls HttpQueryInfo to determine how big a buffer to allocate, which is always reported in bytes. Since CHttpFile::QueryInfo() neglects to divide by sizeof(TCHAR), it ends up allocating a buffer twice as big as necessary in UNICODE builds.When CHttpFile::QueryInfo() subsequently calls ReleaseBuffer() on the CString, it again specifies the incorrect size. As a result, the CString thinks it's bigger than it actually is, and cannot be used normally (e.g., in CString contenation scenarios).
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results