<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Run-Time Check Failure nach Konvertierung von VS6 auf VS2008]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe ein Projekt von VS6 nach VS2008 konvertiert. Mein Projekt lässt sich erstellen, aber sobald ich es ausführe bekomme ich einen Run-Time Ceck Failure.</p>
<p>Fehelermeldung:<br />
Run-Time Check Failure #2 - Stack around the variable 'SubHelp' was corrupted.</p>
<p>Hier der Code, bzw der relevante Teil in dem diese Variable verwendet wird:</p>
<pre><code class="language-cpp">int MyFunction()
{

unsigned char Checksum = NULL;
unsigned char SubHelp = NULL;
char strHelp[3];

sscanf_s(strHelp, &quot;%x&quot;, &amp;subHelp);
Checksum -= SubHelp;

return NULL;

}
</code></pre>
<p>Der Fehler wird ausgelöst sobald die Funktion beendet wird, also an der Stelle der geschweiften Klammer.</p>
<p>Meine Frage also, ist dieses Problem bekannt nach einer Konvertierung von VS6 zu VS2008? Das in VS6 erstellte Projekt löst diesen Fehler nicht aus...</p>
<p>Grüße schnips</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/307115/run-time-check-failure-nach-konvertierung-von-vs6-auf-vs2008</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 01:34:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/307115.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Aug 2012 09:18:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:18:32 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe ein Projekt von VS6 nach VS2008 konvertiert. Mein Projekt lässt sich erstellen, aber sobald ich es ausführe bekomme ich einen Run-Time Ceck Failure.</p>
<p>Fehelermeldung:<br />
Run-Time Check Failure #2 - Stack around the variable 'SubHelp' was corrupted.</p>
<p>Hier der Code, bzw der relevante Teil in dem diese Variable verwendet wird:</p>
<pre><code class="language-cpp">int MyFunction()
{

unsigned char Checksum = NULL;
unsigned char SubHelp = NULL;
char strHelp[3];

sscanf_s(strHelp, &quot;%x&quot;, &amp;subHelp);
Checksum -= SubHelp;

return NULL;

}
</code></pre>
<p>Der Fehler wird ausgelöst sobald die Funktion beendet wird, also an der Stelle der geschweiften Klammer.</p>
<p>Meine Frage also, ist dieses Problem bekannt nach einer Konvertierung von VS6 zu VS2008? Das in VS6 erstellte Projekt löst diesen Fehler nicht aus...</p>
<p>Grüße schnips</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2242731</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242731</guid><dc:creator><![CDATA[schnips]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:18:32 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:21:29 GMT]]></title><description><![CDATA[<p>Herrliches Unternehmen, von 14 Jahre alter Software wird auf 4 Jahre alte Software erneuert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Jedenfalls kann das unter VC6 nicht so laufen, da sscanf_s() dort afaik noch gar nicht existiert hat. Du hast uns also angeschummelt.</p>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2242736</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242736</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:21:29 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:21:57 GMT]]></title><description><![CDATA[<p>also das kann so schonmal nicht kompilieren. Du schreibst subHelp mal groß, mal klein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2242737</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242737</guid><dc:creator><![CDATA[daddy_felix]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:21:57 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:25:00 GMT]]></title><description><![CDATA[<p>Liefer uns doch mal den echten Code, nicht eine schlechte Kopie. Siehe zweiter Link in meiner Signatur.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2242740</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242740</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:25:00 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:30:08 GMT]]></title><description><![CDATA[<p>Richtig, ich musste sscanf in sscanf_s ändern <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> Und nochmal richtig, ich hab den Beitrag verfasst um euch anzuschummeln oO</p>
<p>Daddy, entschuldige meine Tippfehler!</p>
<p>@Pumuckel:</p>
<pre><code class="language-cpp">int CCsHexline::CreateChecksum()
{
	unsigned char Checksum = NULL;
	unsigned char SubHelp = NULL;
	char Datastring[526];
	strncpy_s(Datastring, LPCTSTR(m_strOutput),m_strOutput.GetLength());
	Datastring[m_strOutput.GetLength()] = '\0';
	char strHelp[3];
	char* lpLine = Datastring;

	while(*lpLine != '\0')
	{
		strHelp[0] = * lpLine;
		lpLine++;
		strHelp[1] = * lpLine;
		lpLine++;
		strHelp[2] = '\0';
		sscanf_s(strHelp,&quot;%x&quot;,&amp;SubHelp);		
                  Checksum -= SubHelp;
	}
	sprintf_s(m_strCheck,&quot;%2x&quot;,Checksum);
	m_strCheck[2]='\0';
	if(Checksum &lt; 16)
	{
		m_strCheck[0] = '0';
	}
	return NULL;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2242747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242747</guid><dc:creator><![CDATA[schnips]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:30:08 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:40:08 GMT]]></title><description><![CDATA[<p>Ohne Zeile 1 wuerde ich das jetzt als haesslichen C-Code bezeichnen, aber offenbar soll das ja C++ sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2242754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242754</guid><dc:creator><![CDATA[Kellerautomat]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:40:08 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:43:42 GMT]]></title><description><![CDATA[<p>schnips schrieb:</p>
<blockquote>
<p>ich habe ein Projekt von VS6 nach VS2008 konvertiert. Mein Projekt lässt sich erstellen, aber sobald ich es ausführe bekomme ich einen Run-Time Ceck Failure.</p>
</blockquote>
<p>Faustregel: Dann war es vorher schon falsch, hat bloß zufällig funktioniert. So auch hier ...</p>
<pre><code class="language-cpp">unsigned char SubHelp = NULL;
sscanf_s(strHelp, &quot;%x&quot;, &amp;subHelp);
</code></pre>
<p>unsigned char hat 1 Byte, scanf mit %x beschreibt aber ein int, also (bei dir) 4 Bytes. Welche 3 Bytes da noch beschrieben werden, weiß man nicht...</p>
<blockquote>
<p>Der Fehler wird ausgelöst sobald die Funktion beendet wird, also an der Stelle der geschweiften Klammer.</p>
</blockquote>
<p>Ja, weil VS2008 im Debug-Modus am Funktionsende Code einfügt, der solche Sachen checkt.</p>
<p>Alles unter der Annahme, dass der gepostete Code nicht allzusehr vom wahren Code abweicht :p</p>
<p>schnips schrieb:</p>
<blockquote>
<p>Richtig, ich musste sscanf in sscanf_s ändern <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Nein, musstest du nicht. Du hast dich dafür entschieden, weil du Angst vor Compilerwarnungen hast, die du nicht verstehst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2242759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242759</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:43:42 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:47:40 GMT]]></title><description><![CDATA[<p>Danke dafür Bashar! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2242766</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242766</guid><dc:creator><![CDATA[schnips]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:47:40 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Check Failure nach Konvertierung von VS6 auf VS2008 on Fri, 17 Aug 2012 09:48:08 GMT]]></title><description><![CDATA[<p>Bashar schrieb:</p>
<blockquote>
<p>Faustregel: Dann war es vorher schon falsch, hat bloß zufällig funktioniert. So auch hier ...</p>
<pre><code class="language-cpp">unsigned char SubHelp = NULL;
sscanf_s(strHelp, &quot;%x&quot;, &amp;subHelp);
</code></pre>
<p>unsigned char hat 1 Byte, scanf mit %x beschreibt aber ein int, also (bei dir) 4 Bytes. Welche 3 Bytes da noch beschrieben werden, weiß man nicht...</p>
</blockquote>
<p>Und das ist bei weitem nicht der einzige (potentielle) Fehler.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2242767</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2242767</guid><dc:creator><![CDATA[Furble Wurble]]></dc:creator><pubDate>Fri, 17 Aug 2012 09:48:08 GMT</pubDate></item></channel></rss>