diff options
author | David Monahan <david.monahan@arm.com> | 2023-08-29 09:10:50 +0100 |
---|---|---|
committer | David Monahan <david.monahan@arm.com> | 2023-09-08 10:55:19 +0000 |
commit | 6a1d506cb0619c6bcf8685ada56ddf4507c2f2d4 (patch) | |
tree | be43f5514cf38e06b6dae01886023915dd302eee /profiling/common | |
parent | 564c13dc098eb9353ac15e2609712ab8db9bf350 (diff) | |
download | armnn-6a1d506cb0619c6bcf8685ada56ddf4507c2f2d4.tar.gz |
IVGCVSW-7901 Fix unsafe Usages of Memcpy in Armnn
* Updated usages of Memcpy to use proper checks for null instead of asserts
* Added error checking in places where none existed
Signed-off-by: David Monahan <david.monahan@arm.com>
Change-Id: I9529acd966466ba281f88918be2ec372a756e183
Diffstat (limited to 'profiling/common')
-rw-r--r-- | profiling/common/src/SwTrace.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/profiling/common/src/SwTrace.cpp b/profiling/common/src/SwTrace.cpp index 5860d8cf06..c25baadfec 100644 --- a/profiling/common/src/SwTrace.cpp +++ b/profiling/common/src/SwTrace.cpp @@ -33,7 +33,10 @@ SwTraceMessage ReadSwTraceMessage(const unsigned char* packetBuffer, unsigned int& offset, const unsigned int& packetLength) { - ARM_PIPE_ASSERT(packetBuffer); + if (packetBuffer == nullptr) + { + throw ProfilingException("SwTrace.cpp: Attempting to read a null buffer"); + } unsigned int uint32_t_size = sizeof(uint32_t); |