From ec3fab58f5b1f9ab95e971948dca5304d112039a Mon Sep 17 00:00:00 2001 From: ian Date: Tue, 15 Jan 2008 22:32:49 +0000 Subject: [PATCH] only allow ordinary parsing of pic cmds if length and terminator match --- hostside/skelproto-pic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostside/skelproto-pic.c b/hostside/skelproto-pic.c index 0808ba6..31895b2 100644 --- a/hostside/skelproto-pic.c +++ b/hostside/skelproto-pic.c @@ -58,7 +58,7 @@ void picinsn_decode(const PicInsn *pi, const PicInsnInfo *table, if (pii->argbits <= 6) { if (pi->l != 1) pii= 0; } else { - if (pi->l == 2) { val <<= 7; val |= pi->d[1]; } + if (pi->l == 2 && !(pi->d[1] & 0x80u)) { val <<= 7; val |= pi->d[1]; } else pii= 0; } } -- 2.30.2