Skip to content

Commit

Permalink
Comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed May 14, 2024
1 parent 2b7fb4a commit 3234285
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/bitcoin/database/impl/primitives/head.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ bool CLASS::create() NOEXCEPT

const auto allocation = size();
const auto start = file_.allocate(allocation);

// This guards addition overflow in file_.get (start must be valid).
if (start == storage::eof)
return false;

Expand Down

0 comments on commit 3234285

Please sign in to comment.