News for hackers. Stuff that matters.
Re:Catching integer overflows in C by saagarjha on Wednesday August 22, 2018 @04:05AM (#17817135)
All half-decent compilers elide a memcpy when you're using it for this purpose; they'll just generate the assembly you "intended" to create. And while I know casting to a char * is legal for all types, I don't believe casting from a char * is legal unless the memory the pointer references is actually the type you're casting to. I'll have to check on this–or if you have a link to the standard on this I can just look at that.

There are no comments on this comment yet.