Commit 07fd82cd authored by Esme Povirk's avatar Esme Povirk Committed by Alexandre Julliard

dwrite: Fix possible use of uninitialized memory.

If the text source returns fewer than length character, part of the buffer will be uninitialized. Signed-off-by: 's avatarEsme Povirk <esme@codeweavers.com> Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 412b36e4
......@@ -865,7 +865,7 @@ static HRESULT get_text_source_ptr(IDWriteTextAnalysisSource *source, UINT32 pos
if (len < length) {
UINT32 read;
*buff = malloc(length * sizeof(WCHAR));
*buff = calloc(length, sizeof(WCHAR));
if (!*buff)
return E_OUTOFMEMORY;
if (*text)
......
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