HT_DEC: Fix opj_t1_allocate_buffers malloc size error (#1426) (fixes #1413)

This commit is contained in:
Yuan 2022-05-31 17:55:12 +08:00 committed by GitHub
parent 5292728740
commit 0535bfc3b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1063,7 +1063,7 @@ 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;
@ -1071,7 +1071,7 @@ static OPJ_BOOL opj_t1_allocate_buffers(
}
t1->flagssize = flagssize;
memset(t1->flags, 0, flagssize);
memset(t1->flags, 0, flagssize * sizeof(opj_flag_t));
}
t1->w = w;