[c-prog] Re: system's protection against buffer overflow

2009-04-13 Thread John Matthews
--- In c-prog@yahoogroups.com, Pedro Izecksohn izecks...@... wrote: I found that static data is executable on some platform. FYI CentOS 5 (linux): Compiled with gcc version 4.1. Now I'll try to overwrite the beginning of main (int, char **). It caused a SIGSEGV. Continuing. Now I'll try to

[c-prog] Re: system's protection against buffer overflow

2009-04-13 Thread Pedro Izecksohn
I found that static data is executable on some platform. I was wrong. There is no reason for a constant string not be executable. It were not testing a writable static piece of memory.

[c-prog] Re: system's protection against buffer overflow

2009-04-13 Thread John Matthews
--- In c-prog@yahoogroups.com, Pedro Izecksohn izecks...@... wrote: There is no reason for a constant string not be executable. ...unless program memory and data memory are physically separate (Harvard architecture) eg. my company's chips: