of/irq: Fix potential buffer overflow