I am seeing things like this quite often in kernel code. p = (struct partition *) (data + 0x1be); But isn't it the case that structures by default can have padding for alignment, which can even be different between architectures? So for example... struct foo { short int quux; short int quuux; } ; ...could be actually eight bytes long, and doing this... static unsigned char bar[] = {0x00, 0x55, 0xAA, 0xFF}; static struct *foo = (struct foo*)bar; static short int quux = foo->quux; static short int quuux = foo->quuux; ...might end up blowing past the end of the array? (Not to mention the fact that the C standard indicates that you can use the binary representation of an object by converting it to void* or char* but that you cannot go the other way because it is not guaranteed for all architectures that array elements are packed, even though in practice we always assume that they are.) -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ