logoalt Hacker News

kccqzy • yesterday at 9:04 PM • 0 replies • view on HN

Calling memcpy on any random old struct in C is how you get bugs. If the struct contains other pointers: who is in charge of freeing them? What if the struct has internal pointers (a pointer pointing to a subobject of the struct)? You are playing with fire and you know it.