为什么显示Memory space at 0x1000b8(object 'p') is not initialized
#include <stdio.h>
#include <string.h>
void fun(char *str)
{
char *p;
int i=0;
if(*str!='\0'){
fun(str+1);
*p=*str;
}
for(i=0;i<strlen(str)-1;i++){
str[i]=p[i];
}
}
int main()
{
char *a="abcdefg";
fun(a);
printf("%s\n",a);
}