Skip to content
Extraits de code Groupes Projets
Valider ef3dfd22 rédigé par Axel Legay's avatar Axel Legay
Parcourir les fichiers

Update ex-lepl1503.c

parent 4cd9209a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -17,7 +17,8 @@ void test_maxifailed(void) /*Exemple de test qui échouera */ ...@@ -17,7 +17,8 @@ void test_maxifailed(void) /*Exemple de test qui échouera */
CU_ASSERT(maxi(0,2)==3); CU_ASSERT(maxi(0,2)==3);
} }
void erreurmalloc(void){ void erreurmalloc(void) /*Une fonction qui fait une erreur malloc (pour ccpcheck et valgrind)
{
char *buffer; char *buffer;
buffer=malloc(3*sizeof(char)); buffer=malloc(3*sizeof(char));
buffer[3]='a'; /*Accès hors tableau*/ buffer[3]='a'; /*Accès hors tableau*/
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter