Skip to content

Commit

Permalink
fix buffer overflow in book (accessing book node without checking if …
Browse files Browse the repository at this point in the history
…the slot is empty)
  • Loading branch information
panstromek committed Feb 20, 2022
1 parent 46a55d0 commit 497a237
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions osfbook.c
Original file line number Diff line number Diff line change
Expand Up @@ -4048,6 +4048,7 @@ fill_move_alternatives( int side_to_move,

if ( child_feasible && (score == 0) &&
!(node[index].flags & WLD_SOLVED) &&
(book_hash_table[slot] != EMPTY_HASH_SLOT) &&
(node[book_hash_table[slot]].flags & WLD_SOLVED) ) {
/* Check if this is a book draw that should be avoided, i.e., one
where the current position is not solved but the child position
Expand Down

0 comments on commit 497a237

Please sign in to comment.