<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Possible Error in XTPCommandBar?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : Possible Error in XTPCommandBar?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 04:29:41 +0000</pubDate>
  <lastBuildDate>Tue, 13 Feb 2007 07:47:57 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=6384</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Possible Error in XTPCommandBar? : Hello, When we call it we assume...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6384&amp;PID=20355&amp;title=possible-error-in-xtpcommandbar#20355</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6384<br /><strong>Posted:</strong> 13 February 2007 at 7:47am<br /><br />Hello,<DIV>When we call it we assume toolbar is docked. But agree, that we have add some check for developers how we call this method outside of library. Added ASSERT.</DIV>]]>
   </description>
   <pubDate>Tue, 13 Feb 2007 07:47:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6384&amp;PID=20355&amp;title=possible-error-in-xtpcommandbar#20355</guid>
  </item> 
  <item>
   <title><![CDATA[Possible Error in XTPCommandBar? : We&amp;#039;ve recently evaluated...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6384&amp;PID=20313&amp;title=possible-error-in-xtpcommandbar#20313</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2231">skemp@docucorp</a><br /><strong>Subject:</strong> 6384<br /><strong>Posted:</strong> 12 February 2007 at 2:26pm<br /><br />We've recently evaluated a development tool that is supposed to help identify potential programming errors. The following item was found within your framework headers.<DIV><BR>Please look at this and let us know what you think.</DIV><DIV><P><FONT face="Times New Roman">Buffer overflow, array index of 'm_pDocks' may be outside the bounds. Array 'm_pDocks' of size 4 declared at line 1354 may use index values 4..7</P></FONT><FONT face="Courier New" size=2><P>CommandBars\XTPCommandBars.h </P><P>1404 AFX_INLINE CXTPDockBar* CXTPCommandBars::GetDockBar(</FONT><FONT face="Courier New" color=#008000 size=2>XTPBarPosition xtpPosition</FONT><FONT face="Courier New" size=2>) const { </P></FONT><FONT face="Courier New" color=#ff0000 size=2><P>1405 return m_pDocks&#091;</FONT><FONT face="Courier New" color=#008000 size=2>xtpPosition</FONT><FONT face="Courier New" color=#ff0000 size=2>&#093;; </P></FONT><FONT face="Courier New" size=2><P>1406 } </P></FONT><FONT size=2></FONT><FONT color=#0000ff size=2><P>If we examine the m_pDocks declaration, we can see that it is an array of 4 elements.</P></FONT><FONT face="Courier New" size=2><P>CommandBars\XTPCommandBars.h </P><P>1354 CXTPDockBar* </FONT><FONT face="Courier New" color=#ff0000 size=2>m_pDocks</FONT><FONT face="Courier New" size=2>&#091;4&#093;; // DockBars list </P></FONT><FONT color=#0000ff size=2><P>If we examine the XTPBarPosition declaration (parameter to GetDockBar), we can see that it is an enum declaration from 0 to 7.</P></FONT><FONT face="Courier New" size=2><P>CommandBars\XTPCommandBarsDefines.h </P><P>47 enum </FONT><FONT face="Courier New" color=#008000 size=2>XTPBarPosition</FONT><FONT face="Courier New" size=2> </P><P>48 { </P><P>49 xtpBarTop = 0, // Docked at top. </P><P>50 xtpBarBottom = 1, // Docked at bottom. </P><P>51 xtpBarLeft = 2, // Docked at left. </P><P>52 xtpBarRight = 3, // Docked at right. </P><P>53 xtpBarFloating = 4, // Floated. </P><P>54 xtpBarPopup = 5, // Popup. </P><P>55 xtpBarListBox = 6, // List box. </P><P>56 xtpBarNone = 7 // None. </P><P>57 };</P></FONT><FONT size=2></FONT><FONT color=#0000ff size=2><P>Using any of the enum values from 4 to 7 would cause an out of bounds condition on the array.</P><DIV></DIV></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 12 Feb 2007 14:26:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6384&amp;PID=20313&amp;title=possible-error-in-xtpcommandbar#20313</guid>
  </item> 
 </channel>
</rss>