From 5a5bd0d6d1e77b1d94c18e3d4ce1a52b05dc2967 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Thu, 27 Jul 2017 00:00:51 -0400 Subject: Fix arm memset() handling of negative arguments This fixes the sgt-mines plugin. Same issue was present in an old glibc as well: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=a7ed1adbecb6aac49af75aae3b3498798cf63abc --- firmware/asm/arm/memset.S | 1 + 1 file changed, 1 insertion(+) diff --git a/firmware/asm/arm/memset.S b/firmware/asm/arm/memset.S index 682da87..64cd95c 100644 --- a/firmware/asm/arm/memset.S +++ b/firmware/asm/arm/memset.S @@ -50,6 +50,7 @@ memset: /* * we know that the pointer in r0 is aligned to a word boundary. */ + and r1, r1, #255 @ clear sign bits orr r1, r1, r1, lsl #8 orr r1, r1, r1, lsl #16 mov r3, r1 -- cgit v1.1