Program crashing b/c of malloc, can someone please help?
I created a function to do some security calculations....
After completing these calculations, this function is suppose to return an array to main.
I malloc'ed in the function like this... (its a 1d array)
Code:
tempResult=malloc(sizeof(int)*(hexLength*4));
return tempResult;
the functions declaration looks something like this (since im returning a 1d array):
Code:
int* NAME (PARAMETERS);
Oh, and im 'receiving' the array that is returned into main by declaring a 1d integer array as follows: and then setting xORresult array equal to the function call in main...
Thanks in advance.