pset5 check getting thousands of misspelled words

 char* word1 = malloc(length);

"The strlen() function calculates the length of the string s, excluding the terminating null byte ('\0')"

to begin with, you do not reserve enough memory for all words, certainly works for some words but not for all. on the other hand why use malloc? then you must free your every word, and you know in advance the maximum length of each word (45 + 1, for the null character string end). For the rest, it seems that Check looks good (I say without running the program, then doubtfully).

while(fgetc(diction)!= EOF)
    {
        node* node_1 = calloc(1, sizeof(node));

        node_1->next = NULL;

It does not sound good to me, I would like to read a whole word with fscanf

char buffer[LENGTH + 1];

    while (fscanf(diction,"%s\n", buffer) != EOF )
    { .....

// Allocate memory for a new node and add a new word to the table

node* new_node = malloc(sizeof(node));
strcpy(new_node->word, buffer);
/r/cs50 Thread