The vulnerability is a stack overflow due to uncontrolled recursion during the expansion of XML entities. The patches address this by converting recursive calls into iterative processes. I identified the core functions involved in entity processing for different contexts (general entities in character data, general entities in attribute values, and parameter entities) by examining the diffs in the provided commits. The key functions like internalEntityProcessor, appendAttributeValue (called by storeAttributeValue), and storeEntityValue (called by callStoreEntityValue and doProlog) were directly or indirectly recursive before the fix. The commits show these functions being refactored to use an iterative approach, often involving a m_reenter flag and lists to manage pending entities. Functions like doProlog and doContent were callers into these recursive chains and were also modified to support the new iterative model. The evidence for each function is taken from the commit diffs that illustrate the change from a recursive call to an iterative management or a call to a newly iterative helper.