If you really want to mess up a program, try corrupting the stack.
But maybe you don’t even know what the stack is or where to find it? So surely you won’t be able to corrupt it…
In fact, corrupting the stack is incredibly easy to do in a C program. In the previous lesson in this course, I explained buffer overflows. It’s easy to cause a buffer overflow – just by reading strings from the system prompt. And when you have a buffer overflow there is a good chance that you will also corrupt the stack.
In this lesson, I explain the stack and why it is so easy to mess up!
To follow the course in order, bookmark the playlist:
• Program C in Visual Studio
MORE ON RECURSION
====================
To help you understand the stack, it is also useful to understand how frames are added to the stack during function calls – even recursive function calls. I have a lesson on this here:
• What Are The Call Stack And Stack Fra...
PROGRAMMING BOOKS
====================
If you want to learn C in more depth (and also support this channel!) you might think of buying one of my books. I have written books on C programming, Using Pointers in C, Recursion and other programming topics.
** The Little Book Of C Programming **
Amazon (US) https://amzn.to/2RXwA6a
Amazon (UK) https://amzn.to/2JhlwOA
GET THE SOURCE CODE
=================================
Download the source code of the projects in this course (the archive for “The Little Book Of C”) from:
http://www.bitwisebooks.com/
“CODE WITH HUW” ON TWITTER:
=================================
/ codewithhuw
“CODE WITH HUW” ON FACEBOOK:
=================================
/ codewithhuw
Good luck! And good programming!