'Program crashing at malloc

I am seeking your help today for a program I wrote to read a question and its answer on a file. The file is organised like this :

This is question 1 ?;This is the answer of question 1.
This is question 2 ?;This is the answer of question 2.

and the function I wrote to accomplish this task :

int LectureFichier(question *tab,const char *NomFichier)
{
    FILE *fichier = NULL;
    char c;
    int count = 0;
    int n = 0;
    int m = 0;
    char **ligne = (char**)malloc(sizeof(char*));
    fichier = fopen(NomFichier, "r");
    ligne[0] = (char*)malloc(sizeof(char));
    while ((c = fgetc(fichier)) != EOF)
    {
        if (c == '\n')
        {
            printf("\nTest 35 : n = %d",n);
            strcpy(tab[n].reponse,ligne[m]);
            n++;
            m++;
            tab = realloc(tab,n);
            printf("\nTest 36");
            ligne = realloc(ligne,m);
            printf("\nTest 37");
            ligne[m] = (char*)malloc(sizeof(char));
            printf("\nTest 38");
            count = 0;
            continue;
        }
        if (c == ';')
        {
            strcpy(tab[n].quest,ligne[m]);
            m++;
            printf("\n%s",tab[n].quest);
            ligne = realloc(ligne,m);
            ligne[m] = (char*)malloc(sizeof(char));
            count = 0;
            continue;
        }
        ligne[m][count] = c;
        count ++;
        ligne[m] = realloc(ligne[m],count);
    }
    free(ligne);
    fclose(fichier);
    return 1;
}

Which I call in my main function :

int main()
{
    int retval;
    char *NomFichier;
    question *QuestionsTab;
    QuestionsTab = (question*)malloc(sizeof(question));
    strcpy(NomFichier,"Test.txt");
    retval = LectureFichier(QuestionsTab,NomFichier);
    printf("Test 4");

There is more line in the main function but it is not necessary to give here as the program crash before "Test 4".

In the terminal, there is what is displayed :

Ceci est la question 1 ?[
Test 35 : n = 0
Test 36
Test 37
Process returned -1073740940 (0xC0000374)   execution time : 1.162 s                                                    Press any key to continue. 

It seems to interrupt at the instruction ligne[m] = (char*)malloc(sizeof(char));, and a "[" is printed as well and it is not what I wait from the code.

I am using Windows 10.

Thanks in advance for reading and for your help.

Edit : here is the structure I am using :

typedef struct Question
{
    char *quest;
    char *reponse;
    int NumeroQuestion;
}question;


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source