what would be happen if we copy the size of source more than the size of the destination using memcpy function
unsigned short dst[128];
unsigned short source[256];
memcpy(dst, source, 1000);
what would be happen if we copy the size of source more than the size of the destination using memcpy function
unsigned short dst[128];
unsigned short source[256];
memcpy(dst, source, 1000);
memcpy starts writing to memory beyond the bounds of dest like nothing is wrong, which may or may not trigger a segmentation fault in response to the undefined behavior.