gdi32: Avoid using uninitialized value in DIB pattern enhmetafile record.

This commit is contained in:
Alexandre Julliard 2012-02-24 17:03:57 +01:00
parent c65de04789
commit fd40d65cfa
1 changed files with 1 additions and 1 deletions

View File

@ -172,11 +172,11 @@ DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush )
emr->offBmi = sizeof( EMRCREATEDIBPATTERNBRUSHPT );
emr->cbBmi = info_size;
}
emr->emr.nSize = emr->offBits + emr->cbBits;
emr->ihBrush = index = EMFDRV_AddHandle( dev, hBrush );
emr->iUsage = usage;
emr->offBits = emr->offBmi + emr->cbBmi;
emr->cbBits = info->bmiHeader.biSizeImage;
emr->emr.nSize = emr->offBits + emr->cbBits;
memcpy( (BYTE *)emr + emr->offBmi, info, emr->cbBmi );
memcpy( (BYTE *)emr + emr->offBits, bits, emr->cbBits );