Skip to content

Commit c779fba

Browse files
committed
fix reading uninit memory when provided seqfile is empty
1 parent 29e5021 commit c779fba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zebra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ play_game( const char *file_name,
787787

788788
if ( move_file != NULL ) {
789789
char *newline_pos;
790-
790+
line_buffer[0] = 0;
791791
fgets( line_buffer, sizeof line_buffer, move_file );
792792
newline_pos = strchr( line_buffer, '\n' );
793793
if ( newline_pos != NULL )

0 commit comments

Comments
 (0)