Auto merge of #2078 - ebfull:uaf, r=bitcartel

Fix use after free in transaction_tests.

Fixes #2026
This commit is contained in:
zkbot 2017-02-10 00:29:57 +00:00
commit f52293b982
1 changed files with 1 additions and 0 deletions

View File

@ -475,6 +475,7 @@ BOOST_AUTO_TEST_CASE(test_simple_joinsplit_invalidity)
jsdesc->nullifiers[1] = GetRandHash();
newTx.vjoinsplit.push_back(JSDescription());
jsdesc = &newTx.vjoinsplit[0]; // Fixes #2026. Related PR #2078.
JSDescription *jsdesc2 = &newTx.vjoinsplit[1];
jsdesc2->nullifiers[0] = GetRandHash();