Skip to content
Commit 5cb34600 authored by Philip Chimento's avatar Philip Chimento 🚮
Browse files

arg: Avoid data corruption when marshalling unsupported flat array

Currently, when a function is supposed to receive a flat array (for
example, regress_test_array_struct_in_full() taking RegressTestStructA*)
GJS will instead construct a pointer array (RegressTestStructA** in the
above example) and try to pass it to the function. This leads to garbage
data being passed to the function and possibly crashes.

Anticipate this situation and throw an exception instead.

Related to #44.
parent 85ebaae8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment