Description: Fix pointers casted from long to unsigned int Author: Aurelien Jarno * src/libgrg_crypt.c: Create a temporary variable as the pointer. --- a/src/libgrg_crypt.c +++ b/src/libgrg_crypt.c @@ -347,10 +347,14 @@ } if (gctx->comp_algo) //bz2 + { + unsigned int uint_oDim = oDim; err = BZ2_bzBuffToBuffDecompress ((unsigned char *) - tmpData, (unsigned int *) &oDim, + tmpData, &uint_oDim, (unsigned char *) curdata, curlen, USE_BZ2_SMALL_MEM, 0); + oDim = uint_oDim; + } else //zlib err = uncompress (tmpData, &oDim, curdata, curlen); @@ -411,13 +415,16 @@ //compress the data if (gctx->comp_algo) //bz2 + { + unsigned int uint_compDim = compDim; err = BZ2_bzBuffToBuffCompress (compData, - (unsigned int *) - &compDim, + &uint_compDim, (unsigned char *) origData, uncDim, gctx->comp_lvl * 3, 0, 0); + compDim = uint_compDim; + } else err = compress2 (compData, &compDim, origData, uncDim, gctx->comp_lvl * 3);