We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 97d2f31 + 4efe7b5 commit 597f069Copy full SHA for 597f069
src/glove.c
@@ -135,7 +135,7 @@ int save_params() {
135
long long a, b;
136
char format[20];
137
char output_file[MAX_STRING_LENGTH], output_file_gsq[MAX_STRING_LENGTH];
138
- char *word = malloc(sizeof(char) * MAX_STRING_LENGTH);
+ char *word = malloc(sizeof(char) * MAX_STRING_LENGTH + 1);
139
FILE *fid, *fout, *fgs;
140
141
if(use_binary > 0) { // Save parameters in binary file
0 commit comments