0
#include <stdio.h>
int main(int argc, char *argv[]) {
char buffer[10];
strcpy(buffer, argv[1]);
printf("%s\n", &buffer);
}

how ever i'm getting the gcc error warning: incompatible implicit declaration of built-in function 'strcpy and when I do gdb its showing different strcpy 0x080483a7 : call 0x80482b8 "strcpy @ plt>" I don't know what is plt..

1 Answers1

2

add header

#include <string.h>
Rohit
  • 98
  • 7
  • here is a stackoverflow question http://stackoverflow.com/questions/5469274/what-does-plt-mean-here – Rohit Jan 21 '14 at 06:32
  • hmm I don't really understand it.. whats difference between strcpy and strcpy@plt Does this strcpy@plt effects practice of bufferoverflow? and when I input a commend of disass strcpy it says ""No symbol "strcpy" in current context"" – user3217899 Jan 21 '14 at 06:36
  • No it does not. strcpy@plt is just an indirection given so that the library can be loaded anywhere in the virtual address space without changing addresses at every location of call to strcpy. – Rohit Jan 21 '14 at 06:40