mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00
wasm: validate empty data (#790)
This commit is contained in:
parent
b294a71613
commit
e91dcdb0de
1 changed files with 6 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue