cirrus_vga: fix potential memory overflow