mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 18:55:12 +00:00
avr32: fix relocation check for signed 18-bit offset
commit e68c636d88
upstream.
Caught by static code analysis by David.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0bfd8ffeff
commit
ccc1525f37
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user