From 23006d16f56881b989db77c133b561fc4f7a6a3f Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 5 Oct 2018 18:33:55 +0000 Subject: [PATCH] * Fixed UnhookSignal when RTL_SIGDEFAULT is passed. The bug have caused crash on aarch64-android due to out of bounds read of the rtlsig2ossig[] array. git-svn-id: trunk@39860 - --- rtl/unix/sysutils.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtl/unix/sysutils.pp b/rtl/unix/sysutils.pp index c0a92dd2b0..12c7899e82 100644 --- a/rtl/unix/sysutils.pp +++ b/rtl/unix/sysutils.pp @@ -274,7 +274,7 @@ procedure UnhookSignal(RtlSigNum: Integer; OnlyIfHooked: Boolean = True); fillchar(act,sizeof(act),0); pointer(act.sa_handler):=pointer(SIG_DFL); end; - if (fpsigaction(rtlsig2ossig[RtlSigNum],@act,nil)=0) then + if (fpsigaction(rtlsig2ossig[i],@act,nil)=0) then siginfo[i].hooked:=false; end; end;