From d0b42ee4ec430285797b50d43baed24ac6ce9330 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 15 Sep 2013 12:31:48 +0200 Subject: Core/Spell: Fix Blood Tap array overflow Fix Blood Tap spellid 45529 accessing the 7th element of a size 6 array. Coverity issue id 1023095. --- src/server/game/Spells/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 98c188df08f..a8d4c85656b 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5604,7 +5604,7 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex) // Blood Tap if (m_spellInfo->Id == 45529 && count > 0) { - for (uint32 l = 0; l < MAX_RUNES && count > 0; ++l) + for (uint32 l = 0; l + 1 < MAX_RUNES && count > 0; ++l) { // Check if both runes are on cd as that is the only time when this needs to come into effect if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetCurrentRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB))) -- cgit v1.2.3