(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/lukasz/a AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaa
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
Program received signal SIGSEGV, Segmentation fault.
0xb7ebb0a4 in strcpy () from /lib/tls/i686/cmov/libc.so.6
(gdb)
Nadpisałem adres powroty literą A , ale nie pisze ze program szuka adresu 0x4747474 tylko jakis inny adres...o co chodzi
a to zdisasemblowany program:
(gdb) disass main
Dump of assembler code for function main:
0x080483d4 <main+0>: lea 0x4(%esp),%ecx
0x080483d8 <main+4>: and $0xfffffff0,%esp
0x080483db <main+7>: pushl 0xfffffffc(%ecx)
0x080483de <main+10>: push %ebp
0x080483df <main+11>: mov %esp,%ebp
0x080483e1 <main+13>: push %ecx
0x080483e2 <main+14>: sub $0x24,%esp
0x080483e5 <main+17>: lea 0xfffffff3(%ebp),%eax
0x080483e8 <main+20>: mov %eax,0x4(%esp)
0x080483ec <main+24>: movl $0x80484ec,(%esp)
0x080483f3 <main+31>: call 0x8048320 <scanf@plt>
0x080483f8 <main+36>: lea 0xfffffff3(%ebp),%eax
0x080483fb <main+39>: mov %eax,0x4(%esp)
0x080483ff <main+43>: lea 0xfffffff9(%ebp),%eax
0x08048402 <main+46>: mov %eax,(%esp)
0x08048405 <main+49>: call 0x8048330 <strcpy@plt>
0x0804840a <main+54>: lea 0xfffffff9(%ebp),%eax
0x0804840d <main+57>: mov %eax,(%esp)
0x08048410 <main+60>: call 0x8048340 <printf@plt>
0x08048415 <main+65>: mov $0x0,%eax
0x0804841a <main+70>: add $0x24,%esp
0x0804841d <main+73>: pop %e
Jak sie usuwa tematy albo prznosi bo jestem tu nowy i zrobiłem kopie tego tematu w dziale assembler