Commit 0350b6c7 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix buffer allocation in setvbuf.

parent b9e306ee
......@@ -4506,7 +4506,7 @@ int CDECL MSVCRT_setvbuf(MSVCRT_FILE* file, char *buf, int mode, MSVCRT_size_t s
file->_flag |= MSVCRT__USERBUF;
file->_bufsiz = size;
}else {
file->_base = file->_ptr = malloc(size);
file->_base = file->_ptr = MSVCRT_malloc(size);
if(!file->_base) {
file->_bufsiz = 0;
MSVCRT__unlock_file(file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment