Fix empty window title

When the size of a RAIL string was 0, we were reporting an OOM error.
This commit is contained in:
David FORT 2015-05-07 15:08:00 +02:00
parent 063c1bc806
commit c330a3715e
1 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,14 @@ static BOOL rail_read_unicode_string(wStream* s, RAIL_UNICODE_STRING* unicode_st
if (Stream_GetRemainingLength(s) < new_len)
return FALSE;
if (!new_len)
{
free(unicode_string->string);
unicode_string->string = NULL;
unicode_string->length = 0;
return TRUE;
}
new_str = (BYTE*) realloc(unicode_string->string, new_len);
if (!new_str)
{