Commit f078d5b4 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Fix buffer size parameter in GetFontFileData for 64-bit.

parent f69bb9d6
...@@ -758,7 +758,7 @@ struct font_fileinfo ...@@ -758,7 +758,7 @@ struct font_fileinfo
/* Undocumented gdi32 exports, used to access actually selected font information */ /* Undocumented gdi32 exports, used to access actually selected font information */
extern BOOL WINAPI GetFontRealizationInfo(HDC hdc, struct font_realization_info *info); extern BOOL WINAPI GetFontRealizationInfo(HDC hdc, struct font_realization_info *info);
extern BOOL WINAPI GetFontFileInfo(DWORD instance_id, DWORD file_index, struct font_fileinfo *info, SIZE_T size, SIZE_T *needed); extern BOOL WINAPI GetFontFileInfo(DWORD instance_id, DWORD file_index, struct font_fileinfo *info, SIZE_T size, SIZE_T *needed);
extern BOOL WINAPI GetFontFileData(DWORD instance_id, DWORD file_index, UINT64 offset, void *buff, DWORD buff_size); extern BOOL WINAPI GetFontFileData(DWORD instance_id, DWORD file_index, UINT64 offset, void *buff, SIZE_T buff_size);
static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop1 *iface, static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop1 *iface,
HDC hdc, IDWriteFontFace **fontface) HDC hdc, IDWriteFontFace **fontface)
......
...@@ -46,7 +46,7 @@ static BOOL (WINAPI *pGetCharWidthInfo)(HDC hdc, void *); ...@@ -46,7 +46,7 @@ static BOOL (WINAPI *pGetCharWidthInfo)(HDC hdc, void *);
static BOOL (WINAPI *pGdiRealizationInfo)(HDC hdc, DWORD *); static BOOL (WINAPI *pGdiRealizationInfo)(HDC hdc, DWORD *);
static BOOL (WINAPI *pGetFontRealizationInfo)(HDC hdc, DWORD *); static BOOL (WINAPI *pGetFontRealizationInfo)(HDC hdc, DWORD *);
static BOOL (WINAPI *pGetFontFileInfo)(DWORD, DWORD, void *, SIZE_T, SIZE_T *); static BOOL (WINAPI *pGetFontFileInfo)(DWORD, DWORD, void *, SIZE_T, SIZE_T *);
static BOOL (WINAPI *pGetFontFileData)(DWORD, DWORD, UINT64, void *, DWORD); static BOOL (WINAPI *pGetFontFileData)(DWORD, DWORD, UINT64, void *, SIZE_T);
static HMODULE hgdi32 = 0; static HMODULE hgdi32 = 0;
static const MAT2 mat = { {0,1}, {0,0}, {0,0}, {0,1} }; static const MAT2 mat = { {0,1}, {0,0}, {0,0}, {0,1} };
......
...@@ -2015,7 +2015,7 @@ BOOL WINAPI EnableEUDC( BOOL enable ) ...@@ -2015,7 +2015,7 @@ BOOL WINAPI EnableEUDC( BOOL enable )
* GetFontFileData (GDI32.@) * GetFontFileData (GDI32.@)
*/ */
BOOL WINAPI GetFontFileData( DWORD instance_id, DWORD file_index, UINT64 offset, BOOL WINAPI GetFontFileData( DWORD instance_id, DWORD file_index, UINT64 offset,
void *buff, DWORD buff_size ) void *buff, SIZE_T buff_size )
{ {
return NtGdiGetFontFileData( instance_id, file_index, &offset, buff, buff_size ); return NtGdiGetFontFileData( instance_id, file_index, &offset, buff, buff_size );
} }
......
...@@ -7008,7 +7008,7 @@ BOOL WINAPI NtGdiGetRasterizerCaps( RASTERIZER_STATUS *status, UINT size ) ...@@ -7008,7 +7008,7 @@ BOOL WINAPI NtGdiGetRasterizerCaps( RASTERIZER_STATUS *status, UINT size )
* NtGdiGetFontFileData (win32u.@) * NtGdiGetFontFileData (win32u.@)
*/ */
BOOL WINAPI NtGdiGetFontFileData( DWORD instance_id, DWORD file_index, UINT64 *offset, BOOL WINAPI NtGdiGetFontFileData( DWORD instance_id, DWORD file_index, UINT64 *offset,
void *buff, DWORD buff_size ) void *buff, SIZE_T buff_size )
{ {
struct gdi_font *font; struct gdi_font *font;
DWORD tag = 0, size; DWORD tag = 0, size;
......
...@@ -1136,7 +1136,7 @@ NTSTATUS WINAPI wow64_NtGdiGetFontFileData( UINT *args ) ...@@ -1136,7 +1136,7 @@ NTSTATUS WINAPI wow64_NtGdiGetFontFileData( UINT *args )
DWORD file_index = get_ulong( &args ); DWORD file_index = get_ulong( &args );
UINT64 *offset = get_ptr( &args ); UINT64 *offset = get_ptr( &args );
void *buff = get_ptr( &args ); void *buff = get_ptr( &args );
DWORD buff_size = get_ulong( &args ); SIZE_T buff_size = get_ulong( &args );
return NtGdiGetFontFileData( instance_id, file_index, offset, buff, buff_size ); return NtGdiGetFontFileData( instance_id, file_index, offset, buff, buff_size );
} }
......
...@@ -341,7 +341,7 @@ INT WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap ); ...@@ -341,7 +341,7 @@ INT WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap );
BOOL WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr ); BOOL WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr );
DWORD WINAPI NtGdiGetFontData( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length ); DWORD WINAPI NtGdiGetFontData( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length );
BOOL WINAPI NtGdiGetFontFileData( DWORD instance_id, DWORD file_index, UINT64 *offset, BOOL WINAPI NtGdiGetFontFileData( DWORD instance_id, DWORD file_index, UINT64 *offset,
void *buff, DWORD buff_size ); void *buff, SIZE_T buff_size );
BOOL WINAPI NtGdiGetFontFileInfo( DWORD instance_id, DWORD file_index, struct font_fileinfo *info, BOOL WINAPI NtGdiGetFontFileInfo( DWORD instance_id, DWORD file_index, struct font_fileinfo *info,
SIZE_T size, SIZE_T *needed ); SIZE_T size, SIZE_T *needed );
DWORD WINAPI NtGdiGetFontUnicodeRanges( HDC hdc, GLYPHSET *lpgs ); DWORD WINAPI NtGdiGetFontUnicodeRanges( HDC hdc, GLYPHSET *lpgs );
......
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