Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

small bug #112

Open
Open
@RFoe

Description

Potential Initialization Bug in B+Tree Node Splitting

Report

In db.c:683-689, there's a potential logical error:

if (get_node_type(root) == NODE_INTERNAL) {
 initialize_internal_node(right_child);
 initialize_internal_node(left_child); // This initialization is lost
}
/* Left child has data copied from old root */
memcpy(left_child, root, PAGE_SIZE); // Overwrites the initialization

The initialize_internal_node(left_child) call is wasted because the subsequent memcpy completely overwrites left_child.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /