<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Annotations - yet more help finding buffer overflows</title><link>http://blogs.msdn.com/martynl/archive/2005/10/10/479332.aspx</link><description>Last time I talked about how we used template overloads to help automatically transform safe calls to strcpy into strcpy_s. But not all calls to strcpy are safe, of course. Consider this code: void GetIntegratedCutlery(char *out) { strcpy(out, “spork”);</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Annotations - yet more help finding buffer overflows</title><link>http://blogs.msdn.com/martynl/archive/2005/10/10/479332.aspx#487587</link><pubDate>Tue, 01 Nov 2005 09:57:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487587</guid><dc:creator>asdf</dc:creator><description>Annotations sound similar to custom qualifiers (&lt;a rel="nofollow" target="_new" href="http://www.cs.umd.edu/~jfoster/cqual/"&gt;http://www.cs.umd.edu/~jfoster/cqual/&lt;/a&gt; or &lt;a rel="nofollow" target="_new" href="http://www.cs.berkeley.edu/~dsw/oink.html"&gt;http://www.cs.berkeley.edu/~dsw/oink.html&lt;/a&gt;) but more flexible. What I'm wondering is how it interacts with the type system, for example:&lt;br&gt;&lt;br&gt;void foo(__in_z char*, char*);&lt;br&gt;&lt;br&gt;void (*a)(__in_z char*, char*) = foo;&lt;br&gt;void (*b)(char*, char*) = foo;&lt;br&gt;void (*c)(__in_z char*, __in_z char*) = foo;&lt;br&gt;&lt;br&gt;Are any of those 3 lines valid like I imagine they are?</description></item></channel></rss>