cma: fix calculation of aligned offset