src: fix potential segmentation fault in SQLite
The Local<Value>
returned from ColumnToValue()
and ColumnNameToValue()
may be empty (if a JavaScript exception is pending), in which case a segmentation fault may occur at the call sites, which do not check if the Local<Value>
is empty. Fix this bug by returning early if an exception is pending (as indicated by the Local
being empty).
In the long term, these functions should return MaybeLocal
instead of Local
, but this patch is supposed to be a minimal bug fix only.