<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for dpunk!</title>
	<atom:link href="http://dp.grhack.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://dp.grhack.net</link>
	<description></description>
	<lastBuildDate>Sun, 06 Jun 2010 17:58:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on AthCon 2010 by Thiseas</title>
		<link>http://dp.grhack.net/2010/06/05/athcon-2010/#comment-79</link>
		<dc:creator>Thiseas</dc:creator>
		<pubDate>Sun, 06 Jun 2010 17:58:51 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=116#comment-79</guid>
		<description>+100 Mr Dpunk...!
just +100!!
Thank you too for your real nice and advance presentation.</description>
		<content:encoded><![CDATA[<p>+100 Mr Dpunk&#8230;!<br />
just +100!!<br />
Thank you too for your real nice and advance presentation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 10 things you should be careful about when auditing sources by c00kiemon5ter</title>
		<link>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/#comment-66</link>
		<dc:creator>c00kiemon5ter</dc:creator>
		<pubDate>Sat, 01 May 2010 14:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=50#comment-66</guid>
		<description>Case 5: opne() and AUCERT 
The link maybe this : Secure Unix Programming Checklist
http://auscert.org.au/render.html?it=1975

on open() among others : 
[....]
       23. NEVER use system() or popen() calls. execlp and execvp are also
           suspect.
       24. If you are expecting to create a new file with the open
           call, then use the O_EXCL&#124;O_CREAT flags to cause the
           routine to fail if the file exists.  If you expect the
           file to be there, be sure not to include the O_CREAT flag
           so that the routine will fail.
[....]
      To open a file, which should already exist:

        - lstat() the path, check that lstat succeeded
        - check that it&#039;s acceptable (eg, not a symlink)
        - open() (without O_CREAT), check that the open succeeded
        - fstat() the fd returned by open
        - if the lstat and fstat st_ino and st_dev fields match,
          accept.

        To create a new file, which doesn&#039;t already exist:

        - lstat() the path, check that you got ENOENT
        - open(...,...&#124;O_CREAT&#124;O_EXCL,...), check that it succeeded

        If you&#039;re really paranoid, then:

        - fstat() the fd returned by open
        - lstat() the path again, check that (a) it exists and (b)
          isn&#039;t a symlink
        - check that the fstat and the last lstat returned matching
          st_dev and st_ino fields

        NOTE: that the latter depends on the O_CREAT&#124;O_EXCL semantics
        of not following a trailing symlink.
[....]

hope this helps a bit, 
nice blog ;-]</description>
		<content:encoded><![CDATA[<p>Case 5: opne() and AUCERT<br />
The link maybe this : Secure Unix Programming Checklist<br />
<a href="http://auscert.org.au/render.html?it=1975" rel="nofollow">http://auscert.org.au/render.html?it=1975</a></p>
<p>on open() among others :<br />
[....]<br />
       23. NEVER use system() or popen() calls. execlp and execvp are also<br />
           suspect.<br />
       24. If you are expecting to create a new file with the open<br />
           call, then use the O_EXCL|O_CREAT flags to cause the<br />
           routine to fail if the file exists.  If you expect the<br />
           file to be there, be sure not to include the O_CREAT flag<br />
           so that the routine will fail.<br />
[....]<br />
      To open a file, which should already exist:</p>
<p>        &#8211; lstat() the path, check that lstat succeeded<br />
        &#8211; check that it&#8217;s acceptable (eg, not a symlink)<br />
        &#8211; open() (without O_CREAT), check that the open succeeded<br />
        &#8211; fstat() the fd returned by open<br />
        &#8211; if the lstat and fstat st_ino and st_dev fields match,<br />
          accept.</p>
<p>        To create a new file, which doesn&#8217;t already exist:</p>
<p>        &#8211; lstat() the path, check that you got ENOENT<br />
        &#8211; open(&#8230;,&#8230;|O_CREAT|O_EXCL,&#8230;), check that it succeeded</p>
<p>        If you&#8217;re really paranoid, then:</p>
<p>        &#8211; fstat() the fd returned by open<br />
        &#8211; lstat() the path again, check that (a) it exists and (b)<br />
          isn&#8217;t a symlink<br />
        &#8211; check that the fstat and the last lstat returned matching<br />
          st_dev and st_ino fields</p>
<p>        NOTE: that the latter depends on the O_CREAT|O_EXCL semantics<br />
        of not following a trailing symlink.<br />
[....]</p>
<p>hope this helps a bit,<br />
nice blog ;-]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Python in noexec-land by some guy</title>
		<link>http://dp.grhack.net/2009/09/17/python-in-noexec-land/#comment-40</link>
		<dc:creator>some guy</dc:creator>
		<pubDate>Thu, 18 Mar 2010 12:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://decepticonpunk.wordpress.com/?p=12#comment-40</guid>
		<description>LOL, this is almost a year old but, as a loyal Ruby fanboi, I need to chime in:
Ruby has FFI as well (actually it has quite a few, depending on your implementation) BUT there is little if any documentation. Ctypes just has ALL the docs you can use so python wins :-)

I cannot comment on Perl, I ain&#039;t no perl guy :-)

Cheers and keep up the good work!</description>
		<content:encoded><![CDATA[<p>LOL, this is almost a year old but, as a loyal Ruby fanboi, I need to chime in:<br />
Ruby has FFI as well (actually it has quite a few, depending on your implementation) BUT there is little if any documentation. Ctypes just has ALL the docs you can use so python wins :-)</p>
<p>I cannot comment on Perl, I ain&#8217;t no perl guy :-)</p>
<p>Cheers and keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on In Berlin everything&#8217;s about *wurst\x00 by guerrilla</title>
		<link>http://dp.grhack.net/2010/01/01/in-berlin-everythings-about-wurstx00/#comment-26</link>
		<dc:creator>guerrilla</dc:creator>
		<pubDate>Mon, 04 Jan 2010 09:23:38 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=87#comment-26</guid>
		<description>Instead of looking into Dragon Book&#039;s version of Syntax Directed Translation, I suggest that you should look at attribute grammars because the semantics are completely defined (unlike SDD) while providing exactly the same facility (if not more).  I think you could learn a lot from the mathematical models. Specifically &quot;extended attribute grammars&quot; which provide a semantics and syntax similar to BNF. 
I&#039;ve been thinking about writing a post introducing formal attribute grammars but haven&#039;t got around to it yet. We&#039;ll see.</description>
		<content:encoded><![CDATA[<p>Instead of looking into Dragon Book&#8217;s version of Syntax Directed Translation, I suggest that you should look at attribute grammars because the semantics are completely defined (unlike SDD) while providing exactly the same facility (if not more).  I think you could learn a lot from the mathematical models. Specifically &#8220;extended attribute grammars&#8221; which provide a semantics and syntax similar to BNF.<br />
I&#8217;ve been thinking about writing a post introducing formal attribute grammars but haven&#8217;t got around to it yet. We&#8217;ll see.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on In Berlin everything&#8217;s about *wurst\x00 by xorl</title>
		<link>http://dp.grhack.net/2010/01/01/in-berlin-everythings-about-wurstx00/#comment-25</link>
		<dc:creator>xorl</dc:creator>
		<pubDate>Sun, 03 Jan 2010 04:38:50 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=87#comment-25</guid>
		<description>welcome back sir</description>
		<content:encoded><![CDATA[<p>welcome back sir</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 10 things you should be careful about when auditing sources by SolidSNK</title>
		<link>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/#comment-17</link>
		<dc:creator>SolidSNK</dc:creator>
		<pubDate>Fri, 04 Dec 2009 15:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=50#comment-17</guid>
		<description>Impostor!</description>
		<content:encoded><![CDATA[<p>Impostor!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 10 things you should be careful about when auditing sources by decepticonpunk</title>
		<link>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/#comment-13</link>
		<dc:creator>decepticonpunk</dc:creator>
		<pubDate>Sun, 29 Nov 2009 14:37:15 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=50#comment-13</guid>
		<description>What are you talking about? :-P</description>
		<content:encoded><![CDATA[<p>What are you talking about? :-P</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 10 things you should be careful about when auditing sources by SolidSNK</title>
		<link>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/#comment-12</link>
		<dc:creator>SolidSNK</dc:creator>
		<pubDate>Sat, 28 Nov 2009 11:52:37 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=50#comment-12</guid>
		<description>R.I.P. huku. That swine flu proved nasty.

Goodnight sweet prince</description>
		<content:encoded><![CDATA[<p>R.I.P. huku. That swine flu proved nasty.</p>
<p>Goodnight sweet prince</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 10 things you should be careful about when auditing sources by redbrain</title>
		<link>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/#comment-10</link>
		<dc:creator>redbrain</dc:creator>
		<pubDate>Tue, 10 Nov 2009 23:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=50#comment-10</guid>
		<description>Yep good job its the little things when your learning back in the day you had to learn by making all the mistakes hehe, i made some many stupid mistakes when i think about it haha.

Another suggestion would be

#define xfree( ptr )				\
  assert( ptr != NULL );			\
  free( ptr );					\
  ptr= NULL;

to make sure your ptr is nullified properly! :)</description>
		<content:encoded><![CDATA[<p>Yep good job its the little things when your learning back in the day you had to learn by making all the mistakes hehe, i made some many stupid mistakes when i think about it haha.</p>
<p>Another suggestion would be</p>
<p>#define xfree( ptr )				\<br />
  assert( ptr != NULL );			\<br />
  free( ptr );					\<br />
  ptr= NULL;</p>
<p>to make sure your ptr is nullified properly! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 10 things you should be careful about when auditing sources by argp</title>
		<link>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/#comment-8</link>
		<dc:creator>argp</dc:creator>
		<pubDate>Fri, 06 Nov 2009 12:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://dp.grhack.net/?p=50#comment-8</guid>
		<description>Very nice and well-written post. One thing I would add to the list is the wrong use of the sizeof unary operator (which you indirectly referred to in case 3 about strncpy()). For example

buffer[sizeof(buffer)] = NULL;

and

if(strlen(str_input) &gt; sizeof(buffer))

are very common mistakes.</description>
		<content:encoded><![CDATA[<p>Very nice and well-written post. One thing I would add to the list is the wrong use of the sizeof unary operator (which you indirectly referred to in case 3 about strncpy()). For example</p>
<p>buffer[sizeof(buffer)] = NULL;</p>
<p>and</p>
<p>if(strlen(str_input) &gt; sizeof(buffer))</p>
<p>are very common mistakes.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
