Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/upipe-ts/upipe_ts_pmt_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,8 @@ static int upipe_ts_pmtd_parse_descs(struct upipe *upipe,
const uint8_t *desc;
int j = 0;

uint8_t descl_copy[desclength];
/* desclength can be zero and VLA must be greater than zero */
uint8_t descl_copy[desclength + 1];
uint16_t copy_len = 0;

/* cast needed because biTStream expects an uint8_t * (but doesn't write
Expand Down
5 changes: 3 additions & 2 deletions lib/upipe/ubuf_pic_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ static struct ubuf *ubuf_pic_mem_alloc(struct ubuf_mgr *mgr,

size_t hmsize = hsize / pic_mgr->common_mgr.macropixel;
size_t buffer_size = 0;
size_t plane_sizes[pic_mgr->common_mgr.nb_planes];
size_t strides[pic_mgr->common_mgr.nb_planes];
/* nb_planes can be zero and VLA must be greater than zero */
size_t plane_sizes[pic_mgr->common_mgr.nb_planes + 1];
size_t strides[pic_mgr->common_mgr.nb_planes + 1];
for (uint8_t plane = 0; plane < pic_mgr->common_mgr.nb_planes; plane++) {
size_t align = 0;
if (pic_mgr->align &&
Expand Down
3 changes: 2 additions & 1 deletion lib/upipe/ubuf_sound_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ static struct ubuf *ubuf_sound_mem_alloc(struct ubuf_mgr *mgr,
}

size_t buffer_size = 0;
size_t plane_sizes[sound_mgr->common_mgr.nb_planes];
/* nb_planes can be zero and VLA must be greater than zero */
size_t plane_sizes[sound_mgr->common_mgr.nb_planes + 1];
for (uint8_t plane = 0; plane < sound_mgr->common_mgr.nb_planes; plane++) {
size_t align = 0;
size_t plane_size;
Expand Down
Loading