The vulnerability stems from two key issues: 1) In Http2Channel.java, the parseFrame method didn't properly handle continuation frames across multiple packets, as shown by the addition of a do-while loop in the patch to process continuation data. 2) In HpackEncoder.java, the encode method had incorrect iterator management that could leave headers unprocessed. The commit directly modifies these functions to add proper continuation frame handling and iterator advancement, aligning with the CWE-400 (Uncontrolled Resource Consumption) description. The test case H2CUpgradeContinuationTestCase added in the patch validates these fixes by forcing continuation frame scenarios.