What causes buffer overflow to generate ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What causes buffer overflow to generate ?

8th Apr 2019, 4:01 AM
assellalou
assellalou - avatar
3 Answers
+ 3
... When you overflow a buffer. A buffer is like a temporary container which you write data to, while the data is being prepared to be written elsewhere. Say for example, you have a buffer of 100 bytes: char buffer[100]; if you happen to write more than 100 bytes worth of characters into this buffer, overflow happens. You begin writing beyond the boundaries of the buffer into memory slots that were not allocated to you. If the memory access violation does not crash your program or system, it will (in an even worse scenario) quietly corrupt memory which belongs to other processes and cause unexpected results.
8th Apr 2019, 4:27 AM
Fermi
Fermi - avatar
+ 3
What Fermi said. Best explanation of buffer overrun I have ever seen and I have been programming since the mid-70's.
8th Apr 2019, 1:02 PM
Michael Williams
Michael Williams - avatar
+ 2
Arigato 😊
8th Apr 2019, 4:18 PM
assellalou
assellalou - avatar