This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

buffer overflow on cygwin vs solaris.


Hi, 

I am working through some examples in the buffer overflow tutorial at 
http://www.wbglinks.net/pages/reads/wbgreads/bofs/bof07.html

One of the sample code used is this 

#include <syslog.h>

char buffer[4028];

void main() {

   int i;

   for (i=0; i<=4028; i++)
       buffer[i]='A';

   syslog(LOG_ERR, buffer);
}

According to the tutorial, it should produced output
bash$ gcc -g buf.c -o buf
bash$ buf
Segmentation fault (core dumped)

However, on my cygwin installation, it does not core dump. 
bash$ gcc -g buf.c -o buf
bash$ buf
bash$

On Solaris, it does.

How do I get the core dump equivalent on cygwin installation? 

Thanks.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]