提交 e68c636d 编写于 作者: H Hans-Christian Egtvedt

avr32: fix relocation check for signed 18-bit offset

Caught by static code analysis by David.
Reported-by: NDavid Binderman <dcb314@hotmail.com>
Signed-off-by: NHans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: stable@kernel.org
上级 d6ffe1b8
......@@ -264,7 +264,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
break;
case R_AVR32_GOT18SW:
if ((relocation & 0xfffe0003) != 0
&& (relocation & 0xfffc0003) != 0xffff0000)
&& (relocation & 0xfffc0000) != 0xfffc0000)
return reloc_overflow(module, "R_AVR32_GOT18SW",
relocation);
relocation >>= 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册