You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
448 B

Title: Activity - Code
Video of CERT Secure Coding Initiative Conference 2015 - Robert C. Seacord
https://www.youtube.com/watch?v=1ew0GvB3NpE
Blue box with code in it:
char *copy (size_t n, const char *a) {
if (n == 0) return NULL;
if (a == NULL) return NULL;
char *p = (char *)malloc(n);
if (p == NULL) return NULL;
for (int i = 0; i < n; i++) p[i] = *a++;
return p;
}
White text over-laying the blue box: Spot the defect