TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Fifth Underhanded C Contest is Now Open

49 pointsby marcusover 15 years ago

5 comments

lansteinover 15 years ago
One of the comments there: 'I think someone at American Airlines has already written and is using this code in production.' Hilarious.
评论 #1023113 未加载
lonestarover 15 years ago
My favorite entry is the first runner-up from the encryption challenge in 2007: <a href="http://underhanded.xcott.com/?page_id=16" rel="nofollow">http://underhanded.xcott.com/?page_id=16</a><p>Basically a subtly buggy SWAP() implementation causes the RC4 cipher to output more and more plaintext as time goes on.
DrJokepuover 15 years ago
I love the Underhanded C Contest, I enjoy it a lot more than the Obfuscated C Contest. It is also a great educational material; whenever someone advocates human code inspection as a security measure I only need to point them to the UCC website to display the weaknesses of that approach. (I'm not talking about peer review of course, that serves a different purpose)
btillyover 15 years ago
Writing it in C makes it too easy. You can just store the comment in a struct before the airline so that a long comment overwrites the airline number and luggage gets missed. Store the airline number as text and add a validation routine in case numbers are input badly, and any long comment with a number at the end will reroute your luggage to the new airline.<p>I'm sure the winning entry will be cleverer than that. But all of the entries would have to be better if they insisted on a garbage collected language with safe string handling.<p>You know, like Java, PHP, Visual Basic, C#, Python, JavaScript, Perl, Ruby, etc. (I got that list by reading off the top 10 on the TIOBE index then removing C and C++ because by default they are not garbage collected and offer unsafe string handling.)
评论 #1023448 未加载
Shamiqover 15 years ago
This looks really fun.