wma: fix invalid buffer size assumptions causing random overreads.