From 3a80c4cb0c4fe015e2f19db990778c4a569400b3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 29 Aug 2022 13:32:49 +0200 Subject: [PATCH] additional nullptr check --- linux/devices/Max31865RtdLowlevelHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux/devices/Max31865RtdLowlevelHandler.cpp b/linux/devices/Max31865RtdLowlevelHandler.cpp index 4869fe39..f2815f5f 100644 --- a/linux/devices/Max31865RtdLowlevelHandler.cpp +++ b/linux/devices/Max31865RtdLowlevelHandler.cpp @@ -311,6 +311,9 @@ ReturnValue_t Max31865RtdReader::readReceivedMessage(CookieIF* cookie, uint8_t** return returnvalue::FAILED; } auto* rtdCookie = dynamic_cast(cookie); + if(rtdCookie == nullptr) { + return returnvalue::FAILED; + } uint8_t* exchangePtr = rtdCookie->exchangeBuf.data(); size_t serLen = 0; auto result = rtdCookie->db.serialize(&exchangePtr, &serLen, rtdCookie->exchangeBuf.size(),