arm: Fix heap overflow issue in Neon64Load operation
This patch fixes an issue identified by ASAN where the Neon64Load operation assumes the packet always contains 16 bytes. Change-Id: If24a7e461d60cb80970dfbe61d923d7d56926698 Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
This commit is contained in:
parent
4a3e2156ac
commit
7dc5034ff2
1 changed files with 2 additions and 1 deletions
|
@ -332,7 +332,8 @@ def template NeonLoadCompleteAcc64 {{
|
|||
%(op_decl)s;
|
||||
%(op_rd)s;
|
||||
|
||||
MemUnion &memUnion = *(MemUnion *)pkt->getPtr<uint8_t>();
|
||||
MemUnion memUnion { { } };
|
||||
memcpy(&memUnion, pkt->getPtr<uint8_t>(), pkt->getSize());
|
||||
|
||||
if (fault == NoFault) {
|
||||
%(memacc_code)s;
|
||||
|
|
Loading…
Reference in a new issue