void foo(void) {
/* blah blah */
}
char buf[] = {....};
memcpy( (void *)&foo, buf, sizeof buf);
This thing is giving segmentation fault on RHEL 5/gcc 4.1. Is the text
segment protected? I am assuming foo has enough space for buf.
/* blah blah */
}
char buf[] = {....};
memcpy( (void *)&foo, buf, sizeof buf);
This thing is giving segmentation fault on RHEL 5/gcc 4.1. Is the text
segment protected? I am assuming foo has enough space for buf.
Comment