forked from weaselab/weaseljson
Multiply stackSize by sizeof stack element
This commit is contained in:
1 parent
9319076b44
commit
67e63dc611
1 file changed
+1
-1
+1
-1
@@ -8,7 +8,7 @@ extern "C" {
|
||||
__attribute__((visibility("default"))) WeaselJsonParser *
|
||||
WeaselJsonParser_create(int stackSize, const WeaselJsonCallbacks *callbacks,
|
||||
void *userdata) {
|
||||
auto *buf = malloc(sizeof(Parser3) + stackSize);
|
||||
auto *buf = malloc(sizeof(Parser3) + stackSize * sizeof(*Parser3::stackPtr));
|
||||
if (buf == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user