小编use*_*961的帖子

"粉碎堆栈中的乐趣和利润"中的内存地址计算

我正在阅读" 为乐趣和利润粉碎堆栈 "

在"缓冲区溢出"一节中,我看到:

    0x8000490 <main>:       pushl  %ebp
    0x8000491 <main+1>:     movl   %esp,%ebp
    0x8000493 <main+3>:     subl   $0x4,%esp
    0x8000496 <main+6>:     movl   $0x0,0xfffffffc(%ebp)
    0x800049d <main+13>:    pushl  $0x3
    0x800049f <main+15>:    pushl  $0x2
    0x80004a1 <main+17>:    pushl  $0x1
    0x80004a3 <main+19>:    call   0x8000470 <function>
    0x80004a8 <main+24>:    addl   $0xc,%esp
    0x80004ab <main+27>:    movl   $0x1,0xfffffffc(%ebp)
    0x80004b2 <main+34>:    movl   0xfffffffc(%ebp),%eax
    0x80004b5 <main+37>:    pushl  %eax
    0x80004b6 <main+38>:    pushl  $0x80004f8
    0x80004bb <main+43>:    call   0x8000378 <printf>
    0x80004c0 <main+48>:    addl   $0x8,%esp
    0x80004c3 <main+51>:    movl   %ebp,%esp
    0x80004c5 <main+53>:    popl   %ebp
    0x80004c6 <main+54>:    ret
    0x80004c7 <main+55>:    nop …
Run Code Online (Sandbox Code Playgroud)

c memory stack-overflow assembly

4
推荐指数
1
解决办法
965
查看次数

标签 统计

assembly ×1

c ×1

memory ×1

stack-overflow ×1