Skip to content

Commit

Permalink
Buffer overflow fixed in windows/windows.cpp.
Browse files Browse the repository at this point in the history
This bug fix came from looking at the gentoo bug reports for this game. https://bugs.gentoo.org/show_bug.cgi?id=301033
  • Loading branch information
bderrly committed Jun 19, 2015
1 parent da92325 commit ab0369f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions windows/windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ int main( int argv, char *argc[] )
mvwaddch( winders.top_right, 1, 11, hidden );
mvwaddch( winders.top_right, 1, 15, hidden );

char guessLabel[2];
char guessLabel[3];
for( int i = 1; i <= maxGuesses; i++ ) {
sprintf( guessLabel, "%2d", i );
snprintf( guessLabel, 3, "%2d", i );
mvwaddstr( slit, 16-i, 0, guessLabel );
}
wmove( winders.bottom, 1, 15 );
Expand Down

0 comments on commit ab0369f

Please sign in to comment.