K
karthikbalaguru
Hi,
Consider that the below function returns the processed
output in pContent->load[6].
checkfun(&ipdat, (unsigned char *)&pC->load[6]);
If i call the above function inside a module(function),
data returned in 'pC->load[6]' appears to be corrupted in
Montavista Linux / Fedora Core(Vmware) but the data
appears to be intact in RedHat.
That is, it is working with Redhat and not with
Montavista Linux / Fedora Core(Vmware).
But, if i call the same function by allocating some
memory for collecting the output, then the output
returned in that particular variable/buffer appears to
be intact/correct for Montavista Linux / Fedora
Core(Vmware).
For example, the below changes give uncorrupted
data / output in 'bufConent'
char * bufContent = malloc(100);
checkfun(&ipdat, bufContent);
free(bufContent);
Strange !! How is it possible ?
Where could the problem be ?
Thx in advans,
Karthik Balaguru
Consider that the below function returns the processed
output in pContent->load[6].
checkfun(&ipdat, (unsigned char *)&pC->load[6]);
If i call the above function inside a module(function),
data returned in 'pC->load[6]' appears to be corrupted in
Montavista Linux / Fedora Core(Vmware) but the data
appears to be intact in RedHat.
That is, it is working with Redhat and not with
Montavista Linux / Fedora Core(Vmware).
But, if i call the same function by allocating some
memory for collecting the output, then the output
returned in that particular variable/buffer appears to
be intact/correct for Montavista Linux / Fedora
Core(Vmware).
For example, the below changes give uncorrupted
data / output in 'bufConent'
char * bufContent = malloc(100);
checkfun(&ipdat, bufContent);
free(bufContent);
Strange !! How is it possible ?
Where could the problem be ?
Thx in advans,
Karthik Balaguru