全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Buffer overflow?

Definition 6.2 University Computer Science — Year 1 · 第 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.
在原文中阅读 →