diff --git a/test/validation/api/dma/dma.c b/test/validation/api/dma/dma.c index 557e1ff0a53..b5bcef6619e 100644 --- a/test/validation/api/dma/dma.c +++ b/test/validation/api/dma/dma.c @@ -1162,6 +1162,7 @@ static void test_dma_pkt_segs_to_addr_sync(void) odp_packet_seg_t pkt_seg = odp_packet_first_seg(pkt); uint8_t *src = odp_packet_data(pkt); uint32_t seg_len = odp_packet_seg_len(pkt); + seg_len = MIN(len, seg_len); src += OFFSET; seg_len -= OFFSET;