]> git.ipfire.org Git - thirdparty/valgrind.git/commit
PRE(sys_prlimit64): Check ARG3 and ARG4 ML_(safe_to_deref) up front
authorMark Wielaard <mark@klomp.org>
Tue, 20 May 2025 10:09:13 +0000 (12:09 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 20 May 2025 10:09:13 +0000 (12:09 +0200)
commitf51744ed2d1f07c814b72853ca946da3c94de0f1
tree58421dbff6d76d65831b9beed8416494c100617f
parentc6c37fd95ad1d89f5f644054d1cccd5ecd385e55
PRE(sys_prlimit64): Check ARG3 and ARG4 ML_(safe_to_deref) up front

The previous commit 859d267a456c "PR504341: Prevent LTP setrlimit05
syscall test from crashing valgrind" changed the checking logic of the
PRE handler changing the if-else control flow. Do the ARG3 and ARG4
ML_(safe_to_deref) checking up front and return EFAULT early so the
later checking logic doesn't need to change.

https://bugs.kde.org/show_bug.cgi?id=504341

Suggested-by: Matthias <zzam@gentoo.org>
coregrind/m_syswrap/syswrap-linux.c