Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Computer Science · Glosario

¿Qué es Buffer overflow?

Definition 6.2 University Computer Science — Year 1 · Capítulo 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.
Leer en el capítulo →