s.name = malloc(sizeof(char *)); // I hope this is the right way...
its not the right way, it allocates memory the size of a char pointer, ( 4 bytes most likely )
you want something like ...
s.name = malloc(sizeof(char)*1000);
where 1000 is whatever maximum length of input you are expecting.