<?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 : Memory bug in XTPMarkupStatic</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Memory bug in XTPMarkupStatic]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 15 Jun 2026 19:15:28 +0000</pubDate>
  <lastBuildDate>Mon, 15 Jun 2026 16:08:29 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>30</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=24646</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[Memory bug in XTPMarkupStatic : In Source/Controls/Static/XTPMarkupStatic.cpp,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24646&amp;PID=79414&amp;title=memory-bug-in-xtpmarkupstatic#79414</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2876">DavidH</a><br /><strong>Subject:</strong> 24646<br /><strong>Posted:</strong> 15 June 2026 at 4:08pm<br /><br /><div>In Source/Controls/Static/XTPMarkupStatic.cpp, a growing buffer is not reallocated correctly.</div><div><br></div><div><font face="Courier New, Courier, mono">template&lt;class T&gt;<br>AFX_INLINE BOOL XTPStrPushChr(T*&amp; pStr, T ch, SIZE_T&amp; nPos, SIZE_T&amp; nSize)<br>{<br>&nbsp; &nbsp; if (NULL == pStr)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; nSize = 0x100;<br>&nbsp; &nbsp; &nbsp; &nbsp; pStr&nbsp; = (T*)malloc(nSize * sizeof(T));<br>&nbsp; &nbsp; &nbsp; &nbsp; if (NULL == pStr)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return FALSE;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; *pStr = T('\0');<br>&nbsp; &nbsp; &nbsp; &nbsp; nPos&nbsp; = 0;<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; pStr&#091;nPos&#093; = ch;<br>&nbsp; &nbsp; if (++nPos == nSize)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; nSize *= 2;<br><b>&nbsp; &nbsp;// ---&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp;pStr = (T*)realloc(pStr, nSize);</b></font></div><div><b><font face="Courier New, Courier, mono">&nbsp; &nbsp;// Should be:</font></b></div><div><font face="Courier New, Courier, mono"><b>&nbsp; &nbsp; &nbsp; &nbsp; pStr = (T*)realloc(pStr, nSize * sizeof(T));</b><br>&nbsp; &nbsp; &nbsp; &nbsp; if (NULL == pStr)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return FALSE;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; pStr&#091;nPos&#093; = T('\0');<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; return TRUE;<br>}</font></div>]]>
   </description>
   <pubDate>Mon, 15 Jun 2026 16:08:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24646&amp;PID=79414&amp;title=memory-bug-in-xtpmarkupstatic#79414</guid>
  </item> 
 </channel>
</rss>