src: fix potential segmentation fault in SQLite by tniessen · Pull Request #53850 · nodejs/node
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 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.
nodejs-github-bot
added
c++
labels
Jul 14, 2024
tniessen
added
the
author ready
label
Jul 14, 2024ehsankhfr pushed a commit to ehsankhfr/node that referenced this pull request
Jul 18, 2024The 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 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. PR-URL: nodejs#53850 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
targos pushed a commit that referenced this pull request
Jul 28, 2024The 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 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. PR-URL: #53850 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
targos
added
the
dont-land-on-v20.x
label
Sep 21, 2024This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters