diff options
author | João Matos <joao@tritao.eu> | 2015-06-16 21:27:28 +0300 |
---|---|---|
committer | João Matos <joao@tritao.eu> | 2015-06-16 21:28:25 +0300 |
commit | 823aa3dd4ee4abd745afe6366616d3669bd321de (patch) | |
tree | 9d331e2710f77f96ab78ed1d9b8b55adb94be932 /mcs/class/WindowsBase | |
parent | 0d5437fc329d30271e5da18bc512cb7481a92523 (diff) |
[WindowsBase] Fixed potential string overflow bug when getting Zip entry file length.
Diffstat (limited to 'mcs/class/WindowsBase')
-rw-r--r-- | mcs/class/WindowsBase/ZipSharp/NativeUnzip.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mcs/class/WindowsBase/ZipSharp/NativeUnzip.cs b/mcs/class/WindowsBase/ZipSharp/NativeUnzip.cs index 79a9dc62aec..3b3c3dc5d87 100644 --- a/mcs/class/WindowsBase/ZipSharp/NativeUnzip.cs +++ b/mcs/class/WindowsBase/ZipSharp/NativeUnzip.cs @@ -68,8 +68,7 @@ namespace zipsharp public static long CurrentFileLength (UnzipHandle handle) { UnzipFileInfo info; - StringBuilder sbName = new StringBuilder (128); - int result = unzGetCurrentFileInfo (handle, out info, sbName, new IntPtr (sbName.Capacity), IntPtr.Zero, IntPtr.Zero, null, IntPtr.Zero); + int result = unzGetCurrentFileInfo (handle, out info, null, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, null, IntPtr.Zero); if (result != 0) return -1; |