Oh my god, this is the source code review for a certified voting machine
twitter.com
twitter.com
For voting machines to be "secure", not only would there have to be a serious software audit, but also a serious hardware audit (as hardware could otherwise override software). Then you'd have to somehow make sure that it was the said software and no other that was actually running on the hardware. Then you'd have to make sure that the machines were tamper-proof. All of this would have to be done by multiple auditors from each political party.
You'd have to do this for each of the thousand or tens of thousands of voting machines out there. Then you'd have to do the same for the vote counting machines, which are as if not more important than the individual voting machines.
All of this complexity is ridiculous, and taken together I'm sure there'll still be plenty of zero-day vulnerabilities after even serious audits of all of the above.
Just use pen and paper instead.
Agree with paper ballots. Validation should be default part of process.
That said, it is always interesting to read analyses like this.