strcpy_chk

Robert Connolly robert at linuxfromscratch.org
Thu Aug 10 01:28:10 PDT 2006


http://people.redhat.com/drepper/Defensive-slides.pdf

This paper describes a few GCC and Glibc features, one of which is the strcpy 
wrapper. It has an example program:

#include <string.h>
int main(int argc, char *argv[]) {
  char buf[10];
  strcpy(buf, argv[1]);
  return 0;
}

But when I build this with gcc-4.1.1 and glibc-2.4 it does not "buffer 
overflow detected", it "Segmentation fault". Perhaps this is a Fedora 
feature?

robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20060810/00014ec1/attachment.sig>


More information about the hlfs-dev mailing list