bonjour à tous ,
J'ai un probleme de segmentation dans mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
int main(int argc, char *argv[])
{
   remplirTableauFichier();
}

void remplirTableauFichier ()
{
 	struct char_fbtAllocator *pAllocCaracs1=NULL, *pAllocCaracs2=NULL, *pAllocCaracs3=NULL, *pAllocCaracs4=NULL;
	struct int_fbtAllocator *pAllocLignes1=NULL, *pAllocLignes2=NULL, *pAllocLignes3=NULL, *pAllocLignes4=NULL;
	size_t *pTailles1=NULL, *pTailles2=NULL,*pTailles3=NULL,*pTailles4=NULL, nbMots1=0, nbMots2=0,nbMots3=0,nbMots4=0;
	size_t nbCaracs1=0,nbCaracs2=0, nbCaracs3=0, nbCaracs4=0;
	int nbLignes1=0, nbLignes2=0,nbLignes3=0, nbLignes4=0;
	nbMots1 = SommeTailles1fr(pTailles1);
	nbMots2 = SommeTailles2fr(pTailles2);
	nbMots3 = SommeTailles1en(pTailles3);
    nbMots4 = SommeTailles2en(pTailles4);
	pAllocCaracs1 = char_CreateFbtAllocator(nbCaracs1);
	pAllocCaracs2 = char_CreateFbtAllocator(nbCaracs2);
	pAllocCaracs3 = char_CreateFbtAllocator(nbCaracs3);
	pAllocCaracs4= char_CreateFbtAllocator(nbCaracs4);
	if(pAllocCaracs1==NULL || pAllocCaracs2==NULL|| pAllocCaracs3==NULL|| pAllocCaracs4==NULL)
    goto LNettoyage;
	pAllocLignes1 = int_CreateFbtAllocator(nbLignes1);
	pAllocLignes2 = int_CreateFbtAllocator(nbLignes2);
	pAllocLignes3 = int_CreateFbtAllocator(nbLignes3);
	pAllocLignes4 = int_CreateFbtAllocator(nbLignes4);
	if(pAllocLignes1==NULL || pAllocLignes2==NULL|| pAllocLignes3==NULL|| pAllocLignes4==NULL)
		goto LNettoyage;
}
je vois pas pourquoi
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
size_t SommeTailles1fr(size_t const *pcTailles)
{
	size_t ret = 0;
 
		size_t nouvRet = ret + pcTailles[1];
		if(nouvRet < ret)
		{
			fprintf(stderr, "Les tailles des differents fichiers binaires font un depassement!\n");
			exit(EXIT_FAILURE);
		}
		ret = nouvRet;
 
	return ret;
}
Une idée svp? merci