Format string vulnerabilities
Posted Feb 2, 2012 22:22 UTC (Thu) by
khim (subscriber, #9252)
In reply to:
Format string vulnerabilities by csd
Parent article:
Format string vulnerabilities
How can it be faster? It generates identical code:
$ echo 'void foo() { printf("%s\n", "bar"); }' | gcc -S -O2 -xc - -o-
.file ""
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "bar"
.text
.p2align 4,,15
.globl foo
.type foo, @function
foo:
.LFB0:
.cfi_startproc
movl $.LC0, %edi
jmp puts
.cfi_endproc
.LFE0:
.size foo, .-foo
.ident "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3"
.section .note.GNU-stack,"",@progbits
(
Log in to post comments)