I want to pass this in my function, but something is going wrong
FILE *f = fopen("out.bmp", "rb");
int countBit = 0;
int size = 0;
char* type;
for (int i = 0; i < 54; i++)
fgetc(f);
printf("/* count bit to pixel */\n");
scanf("%d", &countBit);
size=DecodeInformationSize(f, countBit);
type=DecodeInformationType(f, countBit);
DecodeMessage(f,countBit,size,type);
before entering the function type is txt

but after :
void DecodeMessage(FILE *f, int countBit, int size, char* type)
{
char messageSize[8];
char nameOut[15] = "outMessage.";
strcat(nameOut, type);
char* message = (char*)malloc(size * 8);
please explain problem
