#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main()
{
char *some_memory=(char *)0;
printf("Read from null %s\n",some_memory);
sprintf(some_memory,"A write to null\n");
exit(EXIT_SUCCESS);
#include <unistd.h>
#include <stdlib.h>
int main()
{
char *some_memory=(char *)0;
printf("Read from null %s\n",some_memory);
sprintf(some_memory,"A write to null\n");
exit(EXIT_SUCCESS);
}
可以读取,不能访问