<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Underhanded C: The Leaky Redaction</title>
	<atom:link href="http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/feed" rel="self" type="application/rss+xml" />
	<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction</link>
	<description>Programming, Theory, and Math</description>
	<lastBuildDate>Tue, 02 Apr 2013 10:51:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Internet MyBB-Downloads waren infiziert</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2947</link>
		<dc:creator>Internet MyBB-Downloads waren infiziert</dc:creator>
		<pubDate>Wed, 26 Oct 2011 12:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2947</guid>
		<description><![CDATA[[...]  [...]]]></description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linux Flame - Seite 32</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2941</link>
		<dc:creator>Linux Flame - Seite 32</dc:creator>
		<pubDate>Sat, 21 May 2011 13:06:58 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2941</guid>
		<description><![CDATA[[...] kann aber den Source lesen und daher ists viel sicherer!!1!&quot; Thematik immer wieder aufkommt:  Not A Number - Underhanded C: The Leaky Redaction  backdoored Imagebearbeitungsprogramm vom obigem Link&#160; &#160;      [...]]]></description>
		<content:encoded><![CDATA[<p>[...] kann aber den Source lesen und daher ists viel sicherer!!1!&quot; Thematik immer wieder aufkommt:  Not A Number &#8211; Underhanded C: The Leaky Redaction  backdoored Imagebearbeitungsprogramm vom obigem Link&nbsp; &nbsp;      [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nike free singapore</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2940</link>
		<dc:creator>nike free singapore</dc:creator>
		<pubDate>Sat, 14 May 2011 06:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2940</guid>
		<description><![CDATA[I’m impressed, I have to say. Really not often do I encounter a weblog that’s each educative and entertaining, and let me tell you, you have hit the nail on the head. Your concept is outstanding; the problem is something that not enough people are talking intelligently about. I am very happy that I stumbled throughout this in my seek for something referring to this.]]></description>
		<content:encoded><![CDATA[<p>I’m impressed, I have to say. Really not often do I encounter a weblog that’s each educative and entertaining, and let me tell you, you have hit the nail on the head. Your concept is outstanding; the problem is something that not enough people are talking intelligently about. I am very happy that I stumbled throughout this in my seek for something referring to this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rilhas</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2933</link>
		<dc:creator>Rilhas</dc:creator>
		<pubDate>Mon, 27 Dec 2010 15:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2933</guid>
		<description><![CDATA[The usage of fgets does not excuse the programmer. The fact that fgets takes a max buffer size parameter should alert the programmer that he/she should think a bit about whether or not the file could contain lines longer than that buffer size and, if so, what the consequences would be. So the programmer shouldn&#039;t be able to simply not consider cases where the files contain lines larger than the buffer.

The mere act of selecting a buffer size should not be random and, so, should cause the programmer to stop and think about it (using an already defined symbol tucked away in some standard include is no better). 

So the spook either dismisses it as incompetence or believes it was deliberate. Depending on the programmer&#039;s history and persuasion skills the incompetence scenario may be hard to swallow by the spook.

The fact that it can be missed when reading the code is another matter altogether. I missed it, sure. But if I was writing the code I wouldn&#039;t make such a bug. It would be my job not to make such a mistake. I&#039;m not being paid just to press keys on the keyboard, my bosses expect me to be using my brain well and keep all my senses on high alert.

And if I did write the bug (perhaps while drunk or under the influence of hallucinogenic drugs) I would blame myself for being stupid, I would never think of it as &quot;oops... there&#039;s no way a fine-and-dandy programmer like me could ever catch that one... moving on to the next application...&quot;.

I always thought that medical doctors, lawyers, psychologists, and possibly others, should all be necessarily good. Maybe even excellent. These professions have no room for the &quot;sufficient&quot;, &quot;not-so-good&quot;, etc., all those have to be weeded out, simply because people can get really hurt if a certain minimum level of quality in their work cannot be guaranteed. Mediocre is not enough, because those, on average, fail a number of times comparable to the number of times they succeed. And that is just not good enough if you happen to be their patient/client on one of the bad days, so all days have to be good days. Good professions have an extremely high ratio of good to bad days.

Back in the 80&#039;s I didn&#039;t think programming would end up being one of those professions. But, in fact, today people can get really hurt from bad code, either because some company goes bankrupt after some security flaw is exploited and all its 150 workers lose their jobs, or because users trusted some application implicitly and lost a lot of money when their credit card number was stolen by some malware or virus. And many other scenarios in between.

So, looking at how things are made today, I think the IT industry is moving in the wrong direction. Well, at least the bulk of it. Hiring cheap novice or unexperienced programmers, or even flat out bad programmers, and then getting them to learn on the job doing final production code can endup being very damaging to third parties (the users of the software, for example). Even worse, keeping bad programmers just because they are cheap makes someone else (probably a third party, like a user) end up paying for the rest of the cost.

In this case, hiring a rookie to do the code of this entry would, of course, be a bad idea (assuming it was supposed to be used in very critically important situations). A rookie could (and probably would) have made such a mistake, but a more seasoned programmer should have not. And if he/she did? Not seasoned enough then, his/her boss should have known that.

We may be reaching a time when programmers should work like medical doctors. While they are rookies (for the first 10 years of their career) they are supervised, and do nothing without close observation by their superiors. They are, in fact, trainees.

For medical doctors this minimizes loss of lives (and other negative consequences), but it is expensive. True. Somewhere along the way people started thinking that programming was easy and started developing all kinds of crappy software.

At any given time I have something crashing on me, or not doing what it was supposed to do, caused by crappy software. My car&#039;s automatic windshield wiper cannot be used in its most sensitive position, otherwise it sometimes enters a loop of max activity even if it is not raining. The programmer forgot IIR filters sometimes do that and didn&#039;t take the appropriate measures. My phone sometimes enters a state where the screen is non-responsive, but calls can still come in (although I&#039;m unable to answer them). This is a known software bug on the phones. My set top box at home sometimes crashes when the right conditions are met (for example, I have a recording, which I keep for fun, that makes the device crash every time I rewinding to the point where the actor was crossing a door).

We are surrounded by software-based crap, done without quality. Many of us are the culprits, we want to by brand new, unproven, flashy, fast, and cheap, and there is still no real culture for demanding quality and assurances from gadget makers as opposed to an already well established culture of selecting refrigerators and dishwashers based on how many decades their manufacturers guarantee their devices to work correctly.

... well, I digress. Very nice post, an excellent example of how to make crappy code if we are not careful.

Kudos!

Thanks!]]></description>
		<content:encoded><![CDATA[<p>The usage of fgets does not excuse the programmer. The fact that fgets takes a max buffer size parameter should alert the programmer that he/she should think a bit about whether or not the file could contain lines longer than that buffer size and, if so, what the consequences would be. So the programmer shouldn&#8217;t be able to simply not consider cases where the files contain lines larger than the buffer.</p>
<p>The mere act of selecting a buffer size should not be random and, so, should cause the programmer to stop and think about it (using an already defined symbol tucked away in some standard include is no better). </p>
<p>So the spook either dismisses it as incompetence or believes it was deliberate. Depending on the programmer&#8217;s history and persuasion skills the incompetence scenario may be hard to swallow by the spook.</p>
<p>The fact that it can be missed when reading the code is another matter altogether. I missed it, sure. But if I was writing the code I wouldn&#8217;t make such a bug. It would be my job not to make such a mistake. I&#8217;m not being paid just to press keys on the keyboard, my bosses expect me to be using my brain well and keep all my senses on high alert.</p>
<p>And if I did write the bug (perhaps while drunk or under the influence of hallucinogenic drugs) I would blame myself for being stupid, I would never think of it as &#8220;oops&#8230; there&#8217;s no way a fine-and-dandy programmer like me could ever catch that one&#8230; moving on to the next application&#8230;&#8221;.</p>
<p>I always thought that medical doctors, lawyers, psychologists, and possibly others, should all be necessarily good. Maybe even excellent. These professions have no room for the &#8220;sufficient&#8221;, &#8220;not-so-good&#8221;, etc., all those have to be weeded out, simply because people can get really hurt if a certain minimum level of quality in their work cannot be guaranteed. Mediocre is not enough, because those, on average, fail a number of times comparable to the number of times they succeed. And that is just not good enough if you happen to be their patient/client on one of the bad days, so all days have to be good days. Good professions have an extremely high ratio of good to bad days.</p>
<p>Back in the 80&#8242;s I didn&#8217;t think programming would end up being one of those professions. But, in fact, today people can get really hurt from bad code, either because some company goes bankrupt after some security flaw is exploited and all its 150 workers lose their jobs, or because users trusted some application implicitly and lost a lot of money when their credit card number was stolen by some malware or virus. And many other scenarios in between.</p>
<p>So, looking at how things are made today, I think the IT industry is moving in the wrong direction. Well, at least the bulk of it. Hiring cheap novice or unexperienced programmers, or even flat out bad programmers, and then getting them to learn on the job doing final production code can endup being very damaging to third parties (the users of the software, for example). Even worse, keeping bad programmers just because they are cheap makes someone else (probably a third party, like a user) end up paying for the rest of the cost.</p>
<p>In this case, hiring a rookie to do the code of this entry would, of course, be a bad idea (assuming it was supposed to be used in very critically important situations). A rookie could (and probably would) have made such a mistake, but a more seasoned programmer should have not. And if he/she did? Not seasoned enough then, his/her boss should have known that.</p>
<p>We may be reaching a time when programmers should work like medical doctors. While they are rookies (for the first 10 years of their career) they are supervised, and do nothing without close observation by their superiors. They are, in fact, trainees.</p>
<p>For medical doctors this minimizes loss of lives (and other negative consequences), but it is expensive. True. Somewhere along the way people started thinking that programming was easy and started developing all kinds of crappy software.</p>
<p>At any given time I have something crashing on me, or not doing what it was supposed to do, caused by crappy software. My car&#8217;s automatic windshield wiper cannot be used in its most sensitive position, otherwise it sometimes enters a loop of max activity even if it is not raining. The programmer forgot IIR filters sometimes do that and didn&#8217;t take the appropriate measures. My phone sometimes enters a state where the screen is non-responsive, but calls can still come in (although I&#8217;m unable to answer them). This is a known software bug on the phones. My set top box at home sometimes crashes when the right conditions are met (for example, I have a recording, which I keep for fun, that makes the device crash every time I rewinding to the point where the actor was crossing a door).</p>
<p>We are surrounded by software-based crap, done without quality. Many of us are the culprits, we want to by brand new, unproven, flashy, fast, and cheap, and there is still no real culture for demanding quality and assurances from gadget makers as opposed to an already well established culture of selecting refrigerators and dishwashers based on how many decades their manufacturers guarantee their devices to work correctly.</p>
<p>&#8230; well, I digress. Very nice post, an excellent example of how to make crappy code if we are not careful.</p>
<p>Kudos!</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomatensuppe</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2932</link>
		<dc:creator>Tomatensuppe</dc:creator>
		<pubDate>Mon, 27 Dec 2010 12:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2932</guid>
		<description><![CDATA[&lt;strong&gt;Underhanded C: The Leaky Redaction &#124; Not A Number...&lt;/strong&gt;

...]]></description>
		<content:encoded><![CDATA[<p><strong>Underhanded C: The Leaky Redaction | Not A Number&#8230;</strong></p>
<p>&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2930</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 26 Dec 2010 17:59:01 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2930</guid>
		<description><![CDATA[a short comment about scanf: 

actually nobody uses scanf, even though the PPM line should not be larger than 70 characters because you don&#039;t whether some stupid user uses a misplaced file ;) 
-&gt; nobody likes programms with security lacks especially not if they&#039;re obvious to any programmer ;)

on the other side, you could have used fgets and sscanf in combination. 

But still, just gread work. 
You deserve it!]]></description>
		<content:encoded><![CDATA[<p>a short comment about scanf: </p>
<p>actually nobody uses scanf, even though the PPM line should not be larger than 70 characters because you don&#8217;t whether some stupid user uses a misplaced file <img src='http://notanumber.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <br />
-&gt; nobody likes programms with security lacks especially not if they&#8217;re obvious to any programmer <img src='http://notanumber.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>on the other side, you could have used fgets and sscanf in combination. </p>
<p>But still, just gread work.<br />
You deserve it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ranju V</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2929</link>
		<dc:creator>Ranju V</dc:creator>
		<pubDate>Sun, 26 Dec 2010 07:10:58 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2929</guid>
		<description><![CDATA[Very slick indeed!]]></description>
		<content:encoded><![CDATA[<p>Very slick indeed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2928</link>
		<dc:creator>Ralph</dc:creator>
		<pubDate>Sat, 25 Dec 2010 18:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2928</guid>
		<description><![CDATA[Terrifying.]]></description>
		<content:encoded><![CDATA[<p>Terrifying.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2927</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Fri, 24 Dec 2010 12:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2927</guid>
		<description><![CDATA[If I was the Spook would reject the code as not having enough comments on whats going on. Plus the code layout is setup to hide problems. Code would not get through a normal code review here, let alone a secure one!

Sorry  - its just bad code!

The penality here for code llike that is a round of drinks!]]></description>
		<content:encoded><![CDATA[<p>If I was the Spook would reject the code as not having enough comments on whats going on. Plus the code layout is setup to hide problems. Code would not get through a normal code review here, let alone a secure one!</p>
<p>Sorry  &#8211; its just bad code!</p>
<p>The penality here for code llike that is a round of drinks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Janne</title>
		<link>http://notanumber.net/archives/54/underhanded-c-the-leaky-redaction/comment-page-1#comment-2926</link>
		<dc:creator>Janne</dc:creator>
		<pubDate>Fri, 24 Dec 2010 11:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://notanumber.net/?p=54#comment-2926</guid>
		<description><![CDATA[I think you can justify this kind of a coding style to a spook also in performance terms: you don&#039;t perform the costly ascii-to-integer parsing, just a very cheap isdigit() call.

Very commendable.]]></description>
		<content:encoded><![CDATA[<p>I think you can justify this kind of a coding style to a spook also in performance terms: you don&#8217;t perform the costly ascii-to-integer parsing, just a very cheap isdigit() call.</p>
<p>Very commendable.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
