When writing programs in the C programming language there are many occasions when you need to use dynamic memory allocation, to ask the OS for some memory. In C you do this with malloc() and you return it with free(). However C doesn’t check what you do with the memory, which is why there is a risk of buffer overflows or buffer overruns.

#c #programming-c

Dynamic Memory Allocation in C - malloc, free, and buffer overflows
1.55 GEEK