1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#define _GNU_SOURCE #include "common.h" #include <strings.h> int main(int argc, char** argv) { char buffer[12] = {0}; bcopy("1234567890", buffer, sizeof(buffer) - 1); puts(buffer); CHK_FAIL_START bcopy("123456", buffer, argc); CHK_FAIL_END puts(buffer); return ret; }