mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:05:43 +00:00
fixed a problem possible overwrite memory in cmd. base on knowlges from bug 2017. the patch are incorrect to fix it.
we simple do not allown overwrite the memory. both on trunk and 0.3.1 See issue #2017 for more details. svn path=/trunk/; revision=25719
This commit is contained in:
parent
2dcc044532
commit
ca4c9d46fc
1 changed files with 5 additions and 0 deletions
|
@ -187,6 +187,9 @@ ConvertULargeInteger (ULARGE_INTEGER num, LPTSTR des, INT len, BOOL bPutSeperato
|
|||
INT c = 0;
|
||||
INT n = 0;
|
||||
|
||||
if (len <= 1)
|
||||
return 0;
|
||||
|
||||
if (num.QuadPart == 0)
|
||||
{
|
||||
des[0] = _T('0');
|
||||
|
@ -203,6 +206,8 @@ ConvertULargeInteger (ULARGE_INTEGER num, LPTSTR des, INT len, BOOL bPutSeperato
|
|||
temp[30 - c++] = (TCHAR)(num.QuadPart % 10) + _T('0');
|
||||
num.QuadPart /= 10;
|
||||
}
|
||||
if (c>len)
|
||||
c=len;
|
||||
|
||||
for (n = 0; n <= c; n++)
|
||||
des[n] = temp[31 - c + n];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue