No segmentation fault for accessing out of bound memory
问题 I'm not a good English speaker. so in my program I want to copy a text who exists in a txt file to an array. typedef struct Chaine { char * Lachaine; int Taille_C; } Chaine ; int main (void) { Chaine *Tab_Texte=NULL; Tab_Texte=(Chaine*)malloc(sizeof(Chaine)); FILE* Texte= NULL; Texte = fopen("chaines", "r"); fseek(Texte, 0, SEEK_END); Tab_Texte->Taille_C=ftell(Texte); fseek(Texte, 0, SEEK_SET); Tab_Texte->Lachaine=NULL; Tab_Texte->Lachaine=(char*)malloc(sizeof(char)*Tab_Texte->Taille_C);