mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[GDIPLUS] Fix a parameter check
This prevents a possible crash.
This commit is contained in:
@@ -117,7 +117,11 @@ GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette(GpImageAttributes *ima
|
||||
TRACE("(%p,%p,%u)\n", imageattr, palette, type);
|
||||
|
||||
if (!imageattr || !palette || !palette->Count ||
|
||||
#ifdef __REACTOS__
|
||||
type >= ColorAdjustTypeCount || type <= ColorAdjustTypeDefault)
|
||||
#else
|
||||
type >= ColorAdjustTypeCount || type == ColorAdjustTypeDefault)
|
||||
#endif
|
||||
return InvalidParameter;
|
||||
|
||||
apply_image_attributes(imageattr, (LPBYTE)palette->Entries, palette->Count, 1, 0,
|
||||
|
||||
Reference in New Issue
Block a user