bitcoin/bitcoin — pull request #4311 by petertodd (2014-06-09 11:02:45+00:00)
Title: Add SCRIPT_VERIFY_CLEANSTACK script verification flag

Causes VerifyScript() to fail if scriptPubKey/redeemScript execution leaves more than a single stack item. This is a generic malleability fix that can be used with all scriptPubKeys, as per @sipa's BIP62 thoughts. Of course, the current IsStandard() rules should only allow transactions satisfying this rule; I'm working on relaxing those rules.