--------------------------------------------------------------------------- Checking for allocating insufficient memory for copying a string by allocating only strlen(src) bytes instead of strlen(src) + 1 bytes (one extra for the terminating null character). Example: char *b = malloc(strlen(a)); // Should be malloc(strlen(a) + 1); strcpy(b, a); // <== Buffer overrun ------------