You are reading a 4 byte signature and printing it as a null-terminated string - there is no guarantee that there will be a zero to terminate the string...
--
Mats
Type: Posts; User: matsp
You are reading a 4 byte signature and printing it as a null-terminated string - there is no guarantee that there will be a zero to terminate the string...
--
Mats
Have you checked that read actually succeeds, because the value you are printing is 0xCCCCCCCC, which is MS VS standard fill pattern for "uninitialized stack space", so it appears that read isn't...
Can you verify that sizeof(header) is twelve?
--
Mats
So EXACTLY which part of the problem are you struggling with? How far have you got?
--
Mats