mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[GDI32]
Fix parameter check in GetTextExtentExPointA/W. Patch by Kamil Hornicek. Fixes bug 5486, bug 5507 and bug 5511 svn path=/trunk/; revision=48446
This commit is contained in:
parent
e3736b149a
commit
9fd87c4954
3 changed files with 16 additions and 3 deletions
|
@ -192,6 +192,13 @@ GetTextExtentExPointW(
|
|||
LPSIZE lpSize
|
||||
)
|
||||
{
|
||||
|
||||
if(nMaxExtent < -1)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return NtGdiGetTextExtentExW (
|
||||
hdc, (LPWSTR)lpszStr, cchString, nMaxExtent, (PULONG)lpnFit, (PULONG)alpDx, lpSize, 0 );
|
||||
}
|
||||
|
@ -216,6 +223,12 @@ GetTextExtentExPointA(
|
|||
LPWSTR lpszStrW;
|
||||
BOOL rc = 0;
|
||||
|
||||
if(nMaxExtent < -1)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = HEAP_strdupA2W ( &lpszStrW, lpszStr );
|
||||
if (!NT_SUCCESS (Status))
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
|
|
|
@ -96,7 +96,7 @@ INT FASTCALL IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristi
|
|||
ULONG FASTCALL ftGdiGetGlyphOutline(PDC,WCHAR,UINT,LPGLYPHMETRICS,ULONG,PVOID,LPMAT2,BOOL);
|
||||
INT FASTCALL IntGetOutlineTextMetrics(PFONTGDI,UINT,OUTLINETEXTMETRICW *);
|
||||
BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS);
|
||||
BOOL FASTCALL TextIntGetTextExtentPoint(PDC,PTEXTOBJ,LPCWSTR,int,int,LPINT,LPINT,LPSIZE);
|
||||
BOOL FASTCALL TextIntGetTextExtentPoint(PDC,PTEXTOBJ,LPCWSTR,INT,ULONG,LPINT,LPINT,LPSIZE);
|
||||
BOOL FASTCALL ftGdiGetTextMetricsW(HDC,PTMW_INTERNAL);
|
||||
DWORD FASTCALL IntGetFontLanguageInfo(PDC);
|
||||
INT FASTCALL ftGdiGetTextCharsetInfo(PDC,PFONTSIGNATURE,DWORD);
|
||||
|
|
|
@ -2119,8 +2119,8 @@ FASTCALL
|
|||
TextIntGetTextExtentPoint(PDC dc,
|
||||
PTEXTOBJ TextObj,
|
||||
LPCWSTR String,
|
||||
int Count,
|
||||
int MaxExtent,
|
||||
INT Count,
|
||||
ULONG MaxExtent,
|
||||
LPINT Fit,
|
||||
LPINT Dx,
|
||||
LPSIZE Size)
|
||||
|
|
Loading…
Reference in a new issue