From c2546d31876598c390e8c8e3f6ebeb79d1849462 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(+) (limited to 'firmware/asm/arm/memset.S') diff --git a/firmware/asm/arm/memset.S b/firmware/asm/arm/memset.S index 682da874ce..64cd95cc9e 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.2.3