2009/10/8 Mohamedin <[email protected]>: > Here is one function that always crash. The portion of the code that couse > the crash in my opinion is the if which has malloc. I noticed it crash > whenever it is called with the same srcFile and dstFile > > int reduce_quality(const char * srcFile, const char * dstFile, int maxSize){ > > ... > tmpFile = (char *) malloc(sizeof(srcFile)+1);
You meant string length there? sizeof(pointer) is - what is the size of pointers on your OS? 8 bytes? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
