diff options
author | hop311 <hop3114@gmail.com> | 2024-01-22 17:32:18 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-01-22 22:03:23 +0100 |
commit | afbd8024110aaa80a7b94cff9a9d96e763b13916 (patch) | |
tree | b22e63b6e247179df4069df8a0f902ed40a3471e /src/openvic-dataloader/v2script | |
parent | 59ec8275b584d4a48f7836816114d4933c655799 (diff) |
Fixed BasicParser::_file_path relying on externally controlled memory
Diffstat (limited to 'src/openvic-dataloader/v2script')
-rw-r--r-- | src/openvic-dataloader/v2script/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvic-dataloader/v2script/Parser.cpp b/src/openvic-dataloader/v2script/Parser.cpp index c46d326..3141550 100644 --- a/src/openvic-dataloader/v2script/Parser.cpp +++ b/src/openvic-dataloader/v2script/Parser.cpp @@ -273,7 +273,7 @@ const ast::Node::line_col Parser::get_node_end(const ast::NodeCPtr node) const { const ast::Node::line_col ast::Node::get_begin_line_col(const Parser& parser) const { if (!parser._buffer_handler->is_valid() || parser._buffer_handler->_location_map.empty()) return {}; - line_col result; + line_col result {}; auto [itr, range_end] = parser._buffer_handler->_location_map.equal_range(this); if (itr != range_end) { result.line = itr->second.line_nr(); @@ -293,7 +293,7 @@ const ast::Node::line_col ast::Node::get_begin_line_col(const Parser& parser) co const ast::Node::line_col ast::Node::get_end_line_col(const Parser& parser) const { if (!parser._buffer_handler->is_valid() || parser._buffer_handler->_location_map.empty()) return {}; - line_col result; + line_col result {}; auto [itr, range_end] = parser._buffer_handler->_location_map.equal_range(this); if (itr != range_end) { result.line = itr->second.line_nr(); |