The module has been changed to support variable amount of rectangles, so we should just allocate a VLA.