Skip to content

Commit 4efe7b5

Browse files
Russell StewartRussell Stewart
authored andcommitted
Fixed double free or corruption bug.
1 parent 97d2f31 commit 4efe7b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/glove.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ int save_params() {
135135
long long a, b;
136136
char format[20];
137137
char output_file[MAX_STRING_LENGTH], output_file_gsq[MAX_STRING_LENGTH];
138-
char *word = malloc(sizeof(char) * MAX_STRING_LENGTH);
138+
char *word = malloc(sizeof(char) * MAX_STRING_LENGTH + 1);
139139
FILE *fid, *fout, *fgs;
140140

141141
if(use_binary > 0) { // Save parameters in binary file

0 commit comments

Comments
 (0)