Skip to content

Commit 3589982

Browse files
committed
fix buffer overflow in book (accessing book node without checking if the slot is empty)
1 parent c86965b commit 3589982

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

osfbook.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4048,6 +4048,7 @@ fill_move_alternatives( int side_to_move,
40484048

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

0 commit comments

Comments
 (0)