Blag

Leaky redaction

Yay! Third place in the 2008 Underhanded C Contest.

The Underhanded C Contest is about writing a program that would pass a code review, but secretly does evil things, and where the covert behaviour can plausibly be explained away as a bug. This year's challenge was to write a program that would black out one or more rectangles of an image, but secretly retain the information somewhere in the output image. The results were announced today, and apparently I got a third place! Do check it out, the winning entry is really clever!

Here is my contribution:

Posted Wednesday 14-Oct-2009 21:34

Discuss this page

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Anonymous
Sun 2-May-2010 19:53
A clever trick indeed, but there's no way that code would pass a code review at any serious company in the real world.
lft
Linus Åkesson
Mon 3-May-2010 08:24
A clever trick indeed, but there's no way that code would pass a code review at any serious company in the real world.

I live in the real world, actually, and the correctness of your statement clearly depends on what qualifies as a serious company. You must think most of them aren't.
Anonymous
Mon 26-Aug-2013 01:09
Those underhanded C codes never pass my code review. I know C programming, and I can see that it is wrong. If you don't see it, you aren't a real C programmer.