Sign in to follow this  

CScriptBuilder bug

This topic is 1898 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

if defined AS_PROCESS_METADATA - CScriptBuilder crash on this script code:

std::string script = "class "; Edited by Andreas Jonsson

Share this post


Link to post
Share on other sites
I use revision 1427

you can see imgae

pos == 6

[url="http://gyazo.com/da7e15d3a0e96f4d1e4987b7166d540b"]http://gyazo.com/da7...e4987b7166d540b[/url]

[CODE]std::string scirt_text = "class ";
builder.AddSectionFromMemory( scirt_text.c_str() , "test" );
builder.BuildModule();[/CODE] Edited by FDsagizi

Share this post


Link to post
Share on other sites
What compiler are you using?

I can only imagine the crash is due to the modifiedScript[pos] accessing one byte beyond the size of the string. Still, the code is only reading from this position, so it shouldn't crash.

Share this post


Link to post
Share on other sites

This topic is 1898 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this