From ac33e6bb7fa8e89fc38b1e98a71c030c6f65a166 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sun, 24 Dec 2023 06:54:19 +0000 Subject: [PATCH] [*] you slimey rats dont get vtable exec that easily --- Source/IO/IPC/AuIPCPipe.NT.cpp | 4 ++++ Source/IO/IPC/AuIPCPipe.Unix.cpp | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/IO/IPC/AuIPCPipe.NT.cpp b/Source/IO/IPC/AuIPCPipe.NT.cpp index 776490a9..fd4785d6 100644 --- a/Source/IO/IPC/AuIPCPipe.NT.cpp +++ b/Source/IO/IPC/AuIPCPipe.NT.cpp @@ -177,6 +177,10 @@ namespace Aurora::IO::IPC IPCPipeImpl::~IPCPipeImpl() { + if (this->fsHandle_) + { + AuStaticCast(this->fsHandle_)->pIPCPipe = nullptr; + } } AuSPtr IPCPipeImpl::AsReadChannelIsOpen() diff --git a/Source/IO/IPC/AuIPCPipe.Unix.cpp b/Source/IO/IPC/AuIPCPipe.Unix.cpp index b6fb0715..5fd7be6e 100644 --- a/Source/IO/IPC/AuIPCPipe.Unix.cpp +++ b/Source/IO/IPC/AuIPCPipe.Unix.cpp @@ -32,6 +32,11 @@ namespace Aurora::IO::IPC { int fd {-1}; + if (this->fsHandle_) + { + AuStaticCast(this->fsHandle_)->pIPCPipe = nullptr; + } + if (secondary[0] == -1) { this->mutex_->Unlock(); @@ -60,8 +65,8 @@ namespace Aurora::IO::IPC ::close(fd); } - fsHandle_.reset(); - fsStream_.reset(); + this->fsHandle_.reset(); + this->fsStream_.reset(); }