C/C++
buffer.txt
Associated article: Preventing Buffer Overruns in C++
Tags: C/C++ Mobile
Published source code accompanying the article by Richard Grimes in which he examines the topic of buffer overruns in C++ for both Win32 and .NET. Buffer overruns open the door to security breaches by intruders.
Preventing Buffer Overruns in C++
by Richard Grimes
Example 1:
void __cdecl PrintHello(char* name)
{
char buf[10];
strcpy(buf, "hello ");
strcat(buf, name);
puts(buf);
}
Example 2:
(a)
#include <stdio.h>
#include <string.h>
#include <...


