Hey,
I'm a novice programmer reading up on buffer overflows in order to secure
my own programs for exploitation. While reading over "Smashing The Stack
For Fun And Profit" (from phrack #49) i came accross the following
discrepancy on a standard workstation install of redhat 7.2 (gcc 2.96): I
complile this:
example1.c: with gcc -S -o example1.s example1.c and instead of pushl %ebp i have pushl %ebp under the function call. My question is: Why? Is this something redhat Your insight would be greatly appreciated, Thanks. :)
---------------------------------------------------------------------------
void function(int a, int b, int c) {
char buffer1[5];
char buffer2[10];
void main() {
}
function(1,2,3);
---------------------------------------------------------------------------
movl %esp,%ebp
subl $20,%esp
movl %esp, %ebp
subl $40, %esp
specific? is this something gcc specific? is this the standard on most
linux (or even *nix) systems? I realise the article is a bit dated, but
having a buffer double the size caught be off guard.