Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
C::B crash svn9134 wx2.8.12 with IO.ExecuteAndGetOutputAndError in srcipt
BlueHazzard:
Fixed patch about code duplication.
--- Quote from: oBFusCATed on June 17, 2013, 02:10:32 am ---Also do you have an explanation why it crashes? As far as I know scvsprintf could not overflow the buffer...
--- End quote ---
here
--- Code: ---static SQChar temp[2048];
va_list vl;
va_start(vl,s);
scvsprintf( temp,s,vl);
wxString msg = cbC2U(temp);
--- End code ---
We are not using vswprintf but vsprintf and this doesn't check the buffer size, also the buffer size is never passed to scvsprintf, so it has no possibility to check the buffer size...
If the buffer is to small my version reallocates memory and prints again. The old version (if we replace vsprintf with vsnprintf) will truncate the output.
Larger outputs as 2048 are possible (see upper posts).
Navigation
[0] Message Index
[*] Previous page
Go to full version