!17285 bitmapfuzztest失败问题

Merge pull request !17285 from Marksss/master_fuzz
This commit is contained in:
openharmony_ci 2024-11-20 11:55:54 +00:00 committed by Gitee
commit 568197aa7b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -42,8 +42,8 @@ bool BitmapFuzzTest001(const uint8_t* data, size_t size)
g_size = size;
g_pos = 0;
Bitmap bitmap;
int width = static_cast<int>(data[0]);
int height = static_cast<int>(data[1]);
int width = GetObject<int>();
int height = GetObject<int>();
BitmapFormat bitmapFormat = { COLORTYPE_ARGB_4444, ALPHATYPE_OPAQUE };
bitmap.Build(width, height, bitmapFormat);
if (bitmap.GetWidth() != width || bitmap.GetHeight() != height || bitmap.GetPixels() == nullptr) {