0

I am currently learning about the stack, in particular how to perform stack overflow attacks. I understand that the buffer is not the size that the program initially set it as, for example if we deployed a buffer like this char buffer [100], when compiled the buffer size will end up being greater than 100. What data does the compiler add to the initial 100 bytes of data?

0

char buffer [0x100 ]. as local that ends up in stack is filled with junk. (uninitilised buffer )

same buffer if declared as global is zero initialised ie the complete buffer will have 0x0's

compiler can pad your buffer based on alignment

can embed patterns based on debug versus release builds

these are implementation details and subject to chsnge between versions

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.