shithub: scc

Download patch

ref: 8e3bfac935622927d740135a2d0cb970743632c6
parent: 877077e694f952576366f10435c058f26505e53a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Dec 27 08:27:02 EST 2017

[as-z80] Fix buffer overflow in imm16()

Some times the size of the instruction is 4 bytes

--- a/as/target/x80/ins.c
+++ b/as/target/x80/ins.c
@@ -213,7 +213,7 @@
 imm16(Op *op, Node **args)
 {
 	Node *par1, *par2;
-	unsigned char buf[3];
+	unsigned char buf[4];
 	unsigned val;
 	int n = op->size;