This is the relevant code:
char c;
size_t buffer_size = 0;
wchar_t* wc = (wchar_t*) malloc(buffer_size);
int result = recv(this->m_socket, &c, 1, 0);
mbstowcs_s(&buffer_size, wc, buffer_size, &c, 1); // Something is wrong here
How do I fix this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You allocated 0 bytes for
wcand passed that buffer tombstowcs_s.