Fault when casting from char* to uint64_t*
In my code, I write many casting from char* to uint64_t*. Someone success, and someone get failure. I thought I used the unallocated memory, but I rewrote by casting to uint32_t, and then no error happened. Is this normal?
My code:
--------------------------------------
uint32_t sz_t, sz_h;
sz_t = ((uint32_t*)bptr)[0];
bptr += sizeof(sz_t);
sz_h = ((uint32_t*)bptr)[0];
bptr += sizeof(sz_h);
-------------------------------------