diff --git a/src/libjasper/jp2/jp2_cod.c b/src/libjasper/jp2/jp2_cod.c index 7f3608a..c4ba73c 100644 --- a/src/libjasper/jp2/jp2_cod.c +++ b/src/libjasper/jp2/jp2_cod.c @@ -248,7 +248,7 @@ jp2_box_t *jp2_box_get(jas_stream_t *in) box = 0; tmpstream = 0; - if (!(box = jas_malloc(sizeof(jp2_box_t)))) { + if (!(box = jas_calloc(1, sizeof(jp2_box_t)))) { goto error; }