On Sun, Apr 26, 2009 at 5:05 PM, Jean-Louis Faucher
<jfaucher...@gmail.com> wrote:

> After reading this MSDN article
> http://msdn.microsoft.com/en-us/library/aa289171.aspx
> I decided to test these options, and modified orxwin32mak like that (added
> security_check) :

> The second security error ocurs when running SysDriveMap.testGroup. The
> fifth and sixth call to SysDriveMap raises this error : "Run-Time Check
> Failure #2 - Stack around the variable 'DeviceName' was corrupted"
> In both cases, the call is self~assertNotNull(SysDriveMap(,'local'))
> I can't find what's wrong with these two calls, and maybe I loose my time
> for nothing, but...

In rexxutil.cpp, the DeviceName variable is too small:

CHAR     DeviceName[3];
...
sprintf(DeviceName, "%c:\\", dnum+'A'-1);

sprintf() will always append a null, so we have something like   C:\
and no space for the null.  sprintf() will place it at DeviceName[3]
which is probably where the security error comes from, a buffer
overrun.

--
Mark Miesfeld

------------------------------------------------------------------------------
Crystal Reports &#45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty&#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to