modules/buffer: coerce max_size to integer