So am trying to disassemble this simple c program on strncat ,
#include <string.h>
int main(int argc, char **argv) {
char buf[128];
strncat(buf,argv[1],sizeof(buf));
}
After disassembling it
So the thing is the string in argv1 is to be copied to [rbp-0x80] rsi has a pointer to argv1 and rdi is [rbp-0x80]
[rbp-0x80] is 0x7fffffffe0d0 in my case
this is the input that I pass as argv1 perl -e 'print "B"x10;print "A"x118'
so 0x7fffffffe0d0 - 0x7fffffffe0da are supposed to Have 4242... but there is an address stored from 0x7fffffffe0d5 - 0x7fffffffe0d0
Here is the screen shot before calling strncat function
Here is the screen shot after calling strncat function
I don't get why the String starts from 0x7fffffffe0d6 rather than 0x7fffffffe0d0
Any ideas ?
EDIT :