Je veux invoquer un shell dans le programme C par execve:execve invoquant
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
main()
{
char* path = "/bin/sh";
int err = execve(path, &path, NULL);
printf("%d\n", err);
printf("%s\n", strerror(errno));
printf("%x, %x\n", path, &path);
}
Cependant, la sortie est:
-1
Bad address
80485c0, bf816f4c