I am not sure what the following C++ code does (I have replaced parts that don't matter with dots):
unsigned char* p = ...;
unsigned int metaNum;
memcpy( &metaNum, p, sizeof( unsigned int ) );
p += sizeof( unsigned int );
for ( unsigned int m = 0; m < metaNum; m++ ) {
...
}
I know for memcpy
that:
The underlying type of the objects pointed to by both the source and destination pointers are irrelevant for this function; The result is a binary copy of the data.
Still I am not sure what is the interpretation of metaNum
. Is it something obvious or it has to do with the implementation?