
Stack Buffer Overflows Explained and How to Prevent Them
A stack buffer overflow writes past a local array into the data next to it. See how it happens in C, what a canary does, and which habits prevent it.
Tag
445 posts

A stack buffer overflow writes past a local array into the data next to it. See how it happens in C, what a canary does, and which habits prevent it.

Learn the four ideas behind every GStreamer pipeline: elements that process data, pads that connect them, caps that describe formats, and bins that group them.

Learn what blocking and non-blocking I/O mean for sockets on POSIX, what EAGAIN tells you, and why servers with many clients switch to non-blocking mode.

A process owns an address space and a thread is a schedulable flow inside one. See what each shares and isolates on Linux, with fork and pthread_create code.

Write a working Makefile for a small C program with a compiler variable, flags, object files and a clean target, and see how make decides what to rebuild.

Run a C program under Valgrind Memcheck with --leak-check=full to find memory that was allocated and never freed, and read the report down to the source line.

COBOL has no for or while keyword. PERFORM does all looping, with UNTIL, VARYING and TIMES forms, inline or out of line, and tests before or after each pass.

Read and write device registers from the shell with i2cget, i2cset, i2cdump and i2ctransfer from i2c-tools 4.3, using a TMP102 sensor as the worked example.

errno is a per-thread integer that C library and system calls set on failure. Learn when it is valid and how to read it correctly with glibc 2.41.

Compare TinyGo, Zig and Ada for microcontroller firmware: toolchains, blinky programs, memory models, interrupts, C interop and when to choose each.

A complete guide to Linux kernel modules: lifecycle, build, load, parameters, exported symbols, a working misc device, licensing, signing, DKMS and debugging.

Resize video with the FFmpeg scale filter, keep the aspect ratio with -1 and -2, fit inside a box, and pick a scaling algorithm for sharp results.