Timeline for Avoid stack addresses containing zeros
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 27, 2022 at 22:40 | answer | added | Cream | timeline score: 1 | |
Jan 27, 2022 at 15:07 | comment | added | Cream | @user996142 Using the flag -O3 didn't change the position of the stack. In case that wasn't clear: My problem is not that the uninitialized variables contain zeros. My problem is that the addresses (of the variables) are so far up in the stack that they start with zeros, like 0x0046a02c. This is problematic if you want to write them into other pointers using an overflow, because they terminate the string. | |
Jan 27, 2022 at 14:43 | comment | added | Cream | Sorry, that was a typo. I'm using C and compile with gcc. I will try the -O3 option and see if it helps. Thanks! | |
Jan 27, 2022 at 14:41 | history | edited | Cream | CC BY-SA 4.0 |
deleted 1 character in body
|
Jan 27, 2022 at 14:23 | comment | added | user996142 | Are you compiling code with C#? With managed code your variables will contain zeros. Instead, try to compile some native tool with plain C and gcc, enable optimization (like -O3) and uninitialized vars on stack will contain garbage | |
S Jan 27, 2022 at 11:18 | review | First questions | |||
Jan 27, 2022 at 12:29 | |||||
S Jan 27, 2022 at 11:18 | history | asked | Cream | CC BY-SA 4.0 |