From 51181c8c8b077676a8c785b3c818825fb45270b1 Mon Sep 17 00:00:00 2001 From: SecretsOTheP Date: Sat, 23 Nov 2013 21:42:22 -0500 Subject: [PATCH] AA fixes for PEQ's reported crash --- changelog.txt | 4 ++++ zone/AA.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/changelog.txt b/changelog.txt index 1211d1dec..89c24e8db 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,10 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 11/23/2013 == +Secrets: Fixed an issue related to a zone crash where the count of the abilities in an AA was 0, leading to a size 0 buffer issue. + == 11/19/2013 == +Secrets: Fixed an issue with two zone crashes reported on PEQ related to the buff restrictions code and AAs. demonstar55: Partially make use of dot_stacking_exempt (case when it's 1 is implemented, -1 case isn't) == 11/18/2013 == diff --git a/zone/AA.cpp b/zone/AA.cpp index 171f397d3..3e692602d 100644 --- a/zone/AA.cpp +++ b/zone/AA.cpp @@ -1300,6 +1300,10 @@ void Client::SendAA(uint32 id, int seq) { return; int size=sizeof(SendAA_Struct)+sizeof(AA_Ability)*saa2->total_abilities; + + if(size == 0) + return; + uchar* buffer = new uchar[size]; SendAA_Struct* saa=(SendAA_Struct*)buffer; memcpy(saa,saa2,size);