]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Wrong struct size. Use opj_jp2_v2_t instead
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 14 May 2012 14:51:26 +0000 (14:51 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 14 May 2012 14:51:26 +0000 (14:51 +0000)
libopenjpeg/jp2.c

index 84c4f0498e536540f606ef31132269e837650c26..58faac56ce7cb4a0de6d972f07f431c64e1007f0 100644 (file)
@@ -3403,7 +3403,7 @@ opj_jp2_v2_t* jp2_create(opj_bool p_is_decoder)
 {
        opj_jp2_v2_t *jp2 = (opj_jp2_v2_t*)opj_malloc(sizeof(opj_jp2_v2_t));
        if (jp2) {
-               memset(jp2,0,sizeof(opj_jp2_t));
+               memset(jp2,0,sizeof(opj_jp2_v2_t));
 
                /* create the J2K codec */
                if (! p_is_decoder) {