Dereferencing an invalid pointer, then taking the address of the result

According to the specification, the effect of dereferencing an invalid pointer itself produces undefined behaviour. It doesn’t matter what you do after dereferencing it.

Leave a Comment