Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Buffer overflow?

Definition 6.2 University Computer Science — Year 1 · Hoofdstuk 6 — Strings, Structures and Files

A buffer overflow is a write past the end (or before the start) of an array, into the memory that follows it. It is undefined behaviour; in practice, it changes whatever the program keeps there.

The thirteen bytes written by strcpy. The last two letters fall into the two unused bytes that keep age at an offset multiple of 4; the zero byte that ends the string lands on the low byte of age, stored first, and 19 becomes 0.
The thirteen bytes written by strcpy. The last two letters fall into the two unused bytes that keep age at an offset multiple of 4; the zero byte that ends the string lands on the low byte of age, stored first, and 19 becomes 0.
Lees in het hoofdstuk →