wasm: validate empty data (#790)

This commit is contained in:
Michal Maciola 2021-09-09 10:45:58 +02:00 committed by GitHub
parent b294a71613
commit e91dcdb0de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,6 +51,11 @@ public:
return false;
}
if (data.empty()) {
mErrorMsg = "Data is empty";
return false;
}
mPicture = Picture::gen().release();
if (!mPicture) {
mErrorMsg = "Picture get failed";