X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fbin%2Fjp2%2Fopj_compress.c;h=148bf951d748214fbfcf41010298e8095927f0f1;hb=b2751967ecabf8d8856e85ab91e25d4f235e2eb3;hp=2cc2970f62189caec4b6b94b1bce74595d1e684e;hpb=e52909f4c7896c5efff3340d707c12d0df55d3f9;p=openjpeg.git diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c index 2cc2970f..148bf951 100644 --- a/src/bin/jp2/opj_compress.c +++ b/src/bin/jp2/opj_compress.c @@ -824,7 +824,7 @@ static int parse_cmdline_encoder(int argc, char **argv, parameters->tcp_numlayers = (int)numlayers; numresolution = (OPJ_UINT32)parameters->numresolution; matrix_width = numresolution * 3; - parameters->cp_matrice = (int *) malloc(numlayers * matrix_width * sizeof(int)); + parameters->cp_matrice = (int *) malloc(sizeof(int) * numlayers * matrix_width); if (parameters->cp_matrice == NULL) { return 1; }