Skip to content

Commit

Permalink
HT_DEC: Fix opj_t1_allocate_buffers malloc size error (#1426) (fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
zodf0055980 authored May 31, 2022
1 parent 5292728 commit 0535bfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/openjp2/ht_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,15 +1063,15 @@ static OPJ_BOOL opj_t1_allocate_buffers(
if (flagssize > t1->flagssize) {

opj_aligned_free(t1->flags);
t1->flags = (opj_flag_t*) opj_aligned_malloc(flagssize);
t1->flags = (opj_flag_t*) opj_aligned_malloc(flagssize * sizeof(opj_flag_t));
if (!t1->flags) {
/* FIXME event manager error callback */
return OPJ_FALSE;
}
}
t1->flagssize = flagssize;

memset(t1->flags, 0, flagssize);
memset(t1->flags, 0, flagssize * sizeof(opj_flag_t));
}

t1->w = w;
Expand Down

0 comments on commit 0535bfc

Please sign in to comment.