Skip to content

Commit 9a8e9f1

Browse files
committed
fix heap-use-after-free in ORC SearchArgument rewriteLeaves.
1 parent 0a1de48 commit 9a8e9f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

c++/src/sargs/SearchArgument.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ namespace orc {
315315
// Perform BFS
316316
while (!nodes.empty()) {
317317
TreeNode& node = nodes.front();
318-
nodes.pop_front();
319318

320319
if (node->getOperator() == ExpressionTree::Operator::LEAF) {
321320
leaves.insert(node);
@@ -324,6 +323,7 @@ namespace orc {
324323
nodes.push_back(child);
325324
}
326325
}
326+
nodes.pop_front();
327327
}
328328

329329
// Update the leaf in place

0 commit comments

Comments
 (0)