mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
Make do_mremap only check new_addr for wraparound if MREMAP_FIXED was
fixed, as new_addr may be meaningless otherwise. Fix to #204484. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11965
This commit is contained in:
parent
74c0b9293d
commit
e4d325a237
@ -278,8 +278,9 @@ SysRes do_mremap( Addr old_addr, SizeT old_len,
|
||||
goto eINVAL;
|
||||
|
||||
/* reject wraparounds */
|
||||
if (old_addr + old_len < old_addr
|
||||
|| new_addr + new_len < new_len)
|
||||
if (old_addr + old_len < old_addr)
|
||||
goto eINVAL;
|
||||
if (f_fixed == True && new_addr + new_len < new_len)
|
||||
goto eINVAL;
|
||||
|
||||
/* kernel rejects all fixed, no-move requests (which are
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user