I have the following lines:
char *name = malloc(strsize + 1);
data = (uint8_t *)name;
That shouldn't be much of a problem, except that the signedness of the memory would be interpreted differently between access along
name. In most of the practical platforms, the size of
uint8_t in bits is the same.