A buffer overflow occurs when a program tries to write more data to a buffer than the buffer can hold. This can happen when copying data from one buffer to another without first checking that the data fits. The extra data overwrites data values in memory addresses next to the destination buffer. This can corrupt or overwrite the data in those locations.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.