I am asking myself why this piece of code works well when I haven't allocated memory for fptr. I would expect that it has rather an Undefined Behavior because of doing memcpy without allocating memory for fptr or?
struct conf *pconf = NULL;
void (*fptr)(char *, struct conf **);
void *temp = dlsym(dlptr, "config_run_all");
memcpy(&fptr, &temp, sizeof fptr);
fptr("test.conf", &pconf);