Security Audit 5.13: Ensure that string lengths are within limits

and null terminated before copying them to buffers.
This commit is contained in:
Jim Norman
2006-04-26 15:10:02 +00:00
parent f97574c995
commit 619936a51a
3 changed files with 57 additions and 11 deletions

View File

@@ -50,8 +50,9 @@ namespace Novell.CASA.DataEngines.GK
public int cTime;
public NativeItemInfo()
{
displayName = Marshal.AllocHGlobal(128);
secret = Marshal.AllocHGlobal(128);
/* The GUI allows 256 as the max number of chars for these items */
displayName = Marshal.AllocHGlobal(256);
secret = Marshal.AllocHGlobal(256);
}
~NativeItemInfo()
{