ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
236 discussions
Start a n
N
ew thread
[ion] 57347: [NTOSKRNL]: DACL and SACL should only be returned if the control flag indicates that they are present.
by ion@svn.reactos.org
Author: ion Date: Thu Sep 20 00:04:42 2012 New Revision: 57347 URL:
http://svn.reactos.org/svn/reactos?rev=57347&view=rev
Log: [NTOSKRNL]: DACL and SACL should only be returned if the control flag indicates that they are present. Modified: trunk/reactos/ntoskrnl/include/internal/se.h Modified: trunk/reactos/ntoskrnl/include/internal/se.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/se.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/se.h [iso-8859-1] Thu Sep 20 00:04:42 2012 @@ -69,6 +69,8 @@ PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; PISECURITY_DESCRIPTOR_RELATIVE SdRel; + if (!(Descriptor->Control & SE_DACL_PRESENT)) return NULL; + if (Descriptor->Control & SE_SELF_RELATIVE) { SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; @@ -87,6 +89,8 @@ { PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; PISECURITY_DESCRIPTOR_RELATIVE SdRel; + + if (!(Descriptor->Control & SE_SACL_PRESENT)) return NULL; if (Descriptor->Control & SE_SELF_RELATIVE) {
12 years, 3 months
1
0
0
0
[ion] 57346: [NTOSKRNL]: MOAR TEH SESSION SPACE PLZ. KTHXBAI.
by ion@svn.reactos.org
Author: ion Date: Wed Sep 19 23:26:39 2012 New Revision: 57346 URL:
http://svn.reactos.org/svn/reactos?rev=57346&view=rev
Log: [NTOSKRNL]: MOAR TEH SESSION SPACE PLZ. KTHXBAI. Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Wed Sep 19 23:26:39 2012 @@ -18,7 +18,7 @@ #define MI_MIN_INIT_PAGED_POOLSIZE (32 * _1MB) -#define MI_SESSION_VIEW_SIZE (20 * _1MB) +#define MI_SESSION_VIEW_SIZE (36 * _1MB) #define MI_SESSION_POOL_SIZE (16 * _1MB) #define MI_SESSION_IMAGE_SIZE (8 * _1MB) #define MI_SESSION_WORKING_SET_SIZE (4 * _1MB)
12 years, 3 months
1
0
0
0
[tkreuzer] 57345: [CRT] Implement mbstowcs_s. passes all crt apitests.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 19 22:33:13 2012 New Revision: 57345 URL:
http://svn.reactos.org/svn/reactos?rev=57345&view=rev
Log: [CRT] Implement mbstowcs_s. passes all crt apitests. Added: trunk/reactos/lib/sdk/crt/string/mbstowcs_s.c (with props) Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec trunk/reactos/lib/sdk/crt/crt.cmake Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/msvcrt.sp…
============================================================================== --- trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] Wed Sep 19 22:33:13 2012 @@ -1272,7 +1272,7 @@ # stub mbsrtowcs # stub mbsrtowcs_s @ cdecl mbstowcs(ptr str long) -# stub mbstowcs_s +@ cdecl mbstowcs_s(ptr ptr long str long) @ cdecl mbtowc(wstr str long) @ cdecl memchr(ptr long long) @ cdecl memcmp(ptr ptr long) Modified: trunk/reactos/lib/sdk/crt/crt.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.cmake?rev=…
============================================================================== --- trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] Wed Sep 19 22:33:13 2012 @@ -256,6 +256,7 @@ string/is_wctype.c string/itoa.c string/itow.c + string/mbstowcs_s.c string/scanf.c string/splitp.c string/strcoll.c Added: trunk/reactos/lib/sdk/crt/string/mbstowcs_s.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/mbstowc…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/mbstowcs_s.c (added) +++ trunk/reactos/lib/sdk/crt/string/mbstowcs_s.c [iso-8859-1] Wed Sep 19 22:33:13 2012 @@ -1,0 +1,117 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS CRT + * PURPOSE: Implementation of mbstowcs_s + * FILE: lib/sdk/crt/stdlib/mbstowcs_s.c + * PROGRAMMER: Timo Kreuzer + */ + +#include <precomp.h> +#include <specstrings.h> + +#define _mbsnlen strnlen + +_CRTIMP +_Check_return_opt_ +errno_t +__cdecl +mbstowcs_s( + _Out_opt_ size_t *pReturnValue, + _Out_writes_to_opt_(sizeInWords, *pReturnValue) wchar_t *pwcstr, + _In_ size_t sizeInWords, + _In_reads_or_z_(count) const char *pmbstr, + _In_ size_t count) +{ + size_t cchMax, cwcWritten; + errno_t retval = 0; + + /* Make sure, either we have a target buffer > 0 bytes, or no buffer */ + if (!MSVCRT_CHECK_PMT( ((sizeInWords != 0) && (pwcstr != 0)) || + ((sizeInWords == 0) && (pwcstr == 0)) )) + { + _set_errno(EINVAL); + return EINVAL; + } + + /* Check if we have a return value pointer */ + if (pReturnValue) + { + /* Default to 0 bytes written */ + *pReturnValue = 0; + } + + if (!MSVCRT_CHECK_PMT((count == 0) || (pmbstr != 0))) + { + _set_errno(EINVAL); + return EINVAL; + } + + /* Check if there is anything to do */ + if ((pwcstr == 0) && (pmbstr == 0)) + { + _set_errno(EINVAL); + return EINVAL; + } + + /* Check if we have a multibyte string */ + if (pmbstr) + { + /* Check if we also have a wchar buffer */ + if (pwcstr) + { + /* Calculate the maximum the we can write */ + cchMax = (count < sizeInWords) ? count + 1 : sizeInWords; + + /* Now do the conversion */ + cwcWritten = mbstowcs(pwcstr, pmbstr, cchMax); + + /* Check if the buffer was not zero terminated */ + if (cwcWritten == cchMax) + { + /* Check if we reached the max size of the dest buffer */ + if (cwcWritten == sizeInWords) + { + /* Does the caller allow this? */ + if (count != _TRUNCATE) + { + /* Not allowed, truncate to 0 length */ + pwcstr[0] = L'\0'; + + /* Return error */ + _set_errno(ERANGE); + return ERANGE; + } + + /* Inform the caller about truncation */ + retval = STRUNCATE; + } + + /* zero teminate the buffer */ + pwcstr[cwcWritten - 1] = L'\0'; + } + else + { + /* The buffer is zero terminated, count the terminating char */ + cwcWritten++; + } + } + else + { + /* Get the length of the string, plus 0 terminator */ + cwcWritten = _mbsnlen(pmbstr, count) + 1; + } + } + else + { + cwcWritten = count + 1; + } + + /* Check if we have a return value pointer */ + if (pReturnValue) + { + /* Default to 0 bytes written */ + *pReturnValue = cwcWritten; + } + + return retval; +} Propchange: trunk/reactos/lib/sdk/crt/string/mbstowcs_s.c ------------------------------------------------------------------------------ svn:eol-style = native
12 years, 3 months
1
0
0
0
[tkreuzer] 57344: Fix rostests build
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 19 21:40:56 2012 New Revision: 57344 URL:
http://svn.reactos.org/svn/reactos?rev=57344&view=rev
Log: Fix rostests build Modified: trunk/reactos/include/reactos/wine/test.h Modified: trunk/reactos/include/reactos/wine/test.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/test.…
============================================================================== --- trunk/reactos/include/reactos/wine/test.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/test.h [iso-8859-1] Wed Sep 19 21:40:56 2012 @@ -649,7 +649,7 @@ #define ok_size_t(expression, result) \ do { \ size_t _value = (expression); \ - ok(_value == (result), "Wrong value for '%s', expected: " #result " (%p), got: %p\n", \ + ok(_value == (result), "Wrong value for '%s', expected: " #result " (%Ix), got: %Ix\n", \ #expression, (size_t)(result), _value); \ } while (0)
12 years, 3 months
1
0
0
0
[tkreuzer] 57343: [CRT_APITEST] Add tests for mbstowcs_s
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 19 21:20:09 2012 New Revision: 57343 URL:
http://svn.reactos.org/svn/reactos?rev=57343&view=rev
Log: [CRT_APITEST] Add tests for mbstowcs_s Added: trunk/rostests/apitests/crt/mbstowcs_s.c (with props) Modified: trunk/rostests/apitests/crt/msvcrt_crt_apitest.cmake trunk/rostests/apitests/crt/testlist.c Added: trunk/rostests/apitests/crt/mbstowcs_s.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/crt/mbstowcs_s.c…
============================================================================== --- trunk/rostests/apitests/crt/mbstowcs_s.c (added) +++ trunk/rostests/apitests/crt/mbstowcs_s.c [iso-8859-1] Wed Sep 19 21:20:09 2012 @@ -1,0 +1,360 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Test for mbstowcs_s + */ + +#define WIN32_NO_STATUS +#include <stdio.h> +#include <stdlib.h> +#include <wine/test.h> +#include <specstrings.h> + +#define ok_errno(x) ok_hex(errno, (x)) + +errno_t +mbstowcs_s( + size_t *returnval, + wchar_t *widechar, + size_t charoutct, + const char *multibyte, + size_t count); + +void +_invalid_parameter( + const wchar_t * expression, + const wchar_t * function, + const wchar_t * file, + unsigned int line, + uintptr_t pReserved); + +void +_invalid_parameterA( + const char * expression, + const char * function, + const char * file, + unsigned int line, + uintptr_t pReserved) +{ + // call _invalid_parameter +} + +#define MSVCRT_INVALID_PMT(x) _invalid_parameterA(#x, __FUNCTION__, __FILE__, __LINE__, 0) +#define MSVCRT_CHECK_PMT(x) ((x) || (MSVCRT_INVALID_PMT(x),0)) + +#define _mbsnlen strnlen + +errno_t +mbstowcs_s( + _Out_opt_ size_t *pReturnValue, + _Out_ wchar_t *pwcstr, + _In_ size_t sizeInWords, + _In_ const char *pmbstr, + _In_ size_t count) +{ + size_t cchMax, cwcWritten; + errno_t retval = 0; + + if (!MSVCRT_CHECK_PMT( ((sizeInWords != 0) && (pwcstr != 0)) || + ((sizeInWords == 0) && (pwcstr == 0)) )) + { + _set_errno(EINVAL); + return EINVAL; + } + + /* Check if we have a return value pointer */ + if (pReturnValue) + { + /* Default to 0 bytes written */ + *pReturnValue = 0; + } + + if (!MSVCRT_CHECK_PMT((count == 0) || (pmbstr != 0))) + { + _set_errno(EINVAL); + return EINVAL; + } + + /* Check if there is anything to do */ + if ((pwcstr == 0) && (pmbstr == 0)) + { + _set_errno(EINVAL); + return EINVAL; + } + + /* Check if we have a source string */ + if (pmbstr) + { + /* Check if we also have a wchar buffer */ + if (pwcstr) + { + /* Calculate the maximum the we can write */ + cchMax = (count < sizeInWords) ? count + 1 : sizeInWords; + + /* Now do the conversion */ + cwcWritten = mbstowcs(pwcstr, pmbstr, cchMax); + + /* Check if the buffer was not zero terminated */ + if (cwcWritten == cchMax) + { + /* Check if we reached the max size of the dest buffer */ + if (cwcWritten == sizeInWords) + { + /* Does the caller allow this? */ + if (count != _TRUNCATE) + { + /* Not allowed, truncate to 0 length */ + pwcstr[0] = L'\0'; + + /* Return error */ + _set_errno(ERANGE); + return ERANGE; + } + + /* Inform the caller about truncation */ + retval = STRUNCATE; + } + + /* zero teminate the buffer */ + pwcstr[cwcWritten - 1] = L'\0'; + } + else + { + /* The buffer is zero terminated, count the terminating char */ + cwcWritten++; + } + } + else + { + /* Get the length of the string, plus 0 terminator */ + cwcWritten = _mbsnlen(pmbstr, count) + 1; + } + } + else + { + cwcWritten = count + 1; + } + + /* Check if we have a return value pointer */ + if (pReturnValue) + { + /* Default to 0 bytes written */ + *pReturnValue = cwcWritten; + } + + return retval; +} + + + +wchar_t g_expression[64]; +wchar_t g_function[64]; +wchar_t g_file[128]; +unsigned int g_line; +uintptr_t g_pReserved; + +void +_test_invalid_parameter( + const wchar_t * expression, + const wchar_t * function, + const wchar_t * file, + unsigned int line, + uintptr_t pReserved) +{ + wcsncpy(g_expression, expression, sizeof(g_expression) / sizeof(wchar_t)); + wcsncpy(g_function, function, sizeof(g_function) / sizeof(wchar_t)); + wcsncpy(g_file, file, sizeof(g_file) / sizeof(wchar_t)); + g_line = line; + g_pReserved = pReserved; +} + +START_TEST(mbstowcs_s) +{ +// _set_invalid_parameter_handler(_test_invalid_parameter); + + errno_t ret; + size_t returnval; + wchar_t widechar[10]; +#if 1 + _set_errno(0); + returnval = 0xf00bac; + widechar[5] = 0xFF; + ret = mbstowcs_s(&returnval, widechar, 6, "hallo", 5); + ok_long(ret, 0); + ok_size_t(returnval, 6); + ok_char(widechar[5], 0); + ok_wstr(widechar, L"hallo"); + ok_errno(0); + + _set_errno(0); + returnval = 0xf00bac; + widechar[0] = 0xFF; + ret = mbstowcs_s(&returnval, widechar, 1, "", 0); + ok_long(ret, 0); + ok_size_t(returnval, 1); + ok_char(widechar[0], 0); + ok_errno(0); + + _set_errno(0); + returnval = 0xf00bac; + widechar[0] = 0xFF; + widechar[1] = 0xFF; + widechar[2] = 0xFF; + widechar[3] = 0xFF; + widechar[4] = 0xFF; + widechar[5] = 0xFF; + ret = mbstowcs_s(&returnval, widechar, 5, "hallo", 5); + ok_long(ret, ERANGE); + ok_size_t(returnval, 0); + ok_char(widechar[5], 0xFF); + ok_char(widechar[4], L'o'); + ok_char(widechar[3], L'l'); + ok_char(widechar[2], L'l'); + ok_char(widechar[1], L'a'); + ok_char(widechar[0], 0); + ok_errno(ERANGE); + + _set_errno(0); + returnval = 0xf00bac; + widechar[0] = 0xFF; + widechar[1] = 0xFF; + widechar[2] = 0xFF; + widechar[3] = 0xFF; + widechar[4] = 0xFF; + widechar[5] = 0xFF; + ret = mbstowcs_s(&returnval, widechar, 3, "hallo", 5); + ok_long(ret, ERANGE); + ok_size_t(returnval, 0); + ok_char(widechar[5], 0xFF); + ok_char(widechar[4], 0xFF); + ok_char(widechar[3], 0xFF); + ok_char(widechar[2], L'l'); + ok_char(widechar[1], L'a'); + ok_char(widechar[0], 0); + ok_errno(ERANGE); + + _set_errno(0); + ret = mbstowcs_s(0, 0, 0, 0, 0); + ok_long(ret, EINVAL); + ok_errno(EINVAL); + + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, 0, 0, 0, 0); + ok_long(ret, EINVAL); + ok_size_t(returnval, 0); + ok_errno(EINVAL); + + _set_errno(0); + widechar[0] = L'x'; + ret = mbstowcs_s(0, widechar, 0, 0, 0); + ok_long(ret, EINVAL); + ok_char(widechar[0], L'x'); + ok_errno(EINVAL); + + _set_errno(0); + ret = mbstowcs_s(0, widechar, 10, "hallo", 5); + ok_long(ret, 0); + ok_errno(0); + + _set_errno(0); + ret = mbstowcs_s(0, widechar, 0, "hallo", 5); + ok_long(ret, EINVAL); + ok_errno(EINVAL); + + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, 0, 10, "hallo", 5); + ok_long(ret, EINVAL); + ok_size_t(returnval, 0xf00bac); + ok_errno(EINVAL); + + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, 0, 0, "hallo", 5); + ok_long(ret, 0); + ok_size_t(returnval, 6); + ok_errno(0); + + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, widechar, 10, 0, 5); + ok_long(ret, EINVAL); + ok_size_t(returnval, 0); + ok_errno(EINVAL); + + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, widechar, 10, "hallo", 0); + ok_long(ret, 0); + ok_size_t(returnval, 1); + ok_errno(0); +#endif + _set_errno(0); + returnval = 0xf00bac; + widechar[0] = 0xABCD; + widechar[1] = 0xABCD; + widechar[2] = 0xABCD; + widechar[3] = 0xABCD; + widechar[4] = 0xABCD; + widechar[5] = 0xABCD; + ret = mbstowcs_s(&returnval, widechar, 10, "hallo", 2); + ok_long(ret, 0); + ok_size_t(returnval, 3); + ok_char(widechar[5], 0xABCD); + ok_char(widechar[4], 0xABCD); + ok_char(widechar[3], 0xABCD); + ok_char(widechar[2], 0); + ok_char(widechar[1], L'a'); + ok_char(widechar[0], L'h'); + ok_errno(0); +#if 1 + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, widechar, 10, 0, 0); + ok_long(ret, 0); + ok_size_t(returnval, 1); + ok_errno(0); + + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, widechar, 10, "hallo", 7); + ok_long(ret, 0); + ok_size_t(returnval, 6); + ok_errno(0); + + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, 0, 0, "hallo", 7); + ok_long(ret, 0); + ok_size_t(returnval, 6); + ok_errno(0); + + _set_errno(0); + returnval = 0xf00bac; + widechar[0] = 0xABCD; + widechar[1] = 0xABCD; + widechar[2] = 0xABCD; + widechar[3] = 0xABCD; + widechar[4] = 0xABCD; + widechar[5] = 0xABCD; + ret = mbstowcs_s(&returnval, widechar, 5, "hallo", _TRUNCATE); + ok_long(ret, STRUNCATE); + ok_size_t(returnval, 5); + ok_char(widechar[5], 0xABCD); + ok_char(widechar[4], 0); + ok_char(widechar[3], L'l'); + ok_char(widechar[2], L'l'); + ok_char(widechar[1], L'a'); + ok_char(widechar[0], L'h'); + ok_errno(0); + + _set_errno(0); + returnval = 0xf00bac; + ret = mbstowcs_s(&returnval, widechar, 10, "hallo", -1); + ok_long(ret, 0); + ok_size_t(returnval, 6); + ok_errno(0); +#endif + +} Propchange: trunk/rostests/apitests/crt/mbstowcs_s.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/crt/msvcrt_crt_apitest.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/crt/msvcrt_crt_a…
============================================================================== --- trunk/rostests/apitests/crt/msvcrt_crt_apitest.cmake [iso-8859-1] (original) +++ trunk/rostests/apitests/crt/msvcrt_crt_apitest.cmake [iso-8859-1] Wed Sep 19 21:20:09 2012 @@ -1118,7 +1118,7 @@ # mbsrtowcs # mbsrtowcs_s # mbstowcs.c -# mbstowcs_s + mbstowcs_s # mbtowc.c # memchr.c # memcmp.c Modified: trunk/rostests/apitests/crt/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/crt/testlist.c?r…
============================================================================== --- trunk/rostests/apitests/crt/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/crt/testlist.c [iso-8859-1] Wed Sep 19 21:20:09 2012 @@ -6,6 +6,7 @@ #include "wine/test.h" #if defined(TEST_MSVCRT) +extern void func_mbstowcs_s(void); extern void func__vscprintf(void); extern void func__vscwprintf(void); #endif @@ -31,6 +32,7 @@ #endif #if defined(TEST_STATIC_CRT) #elif defined(TEST_MSVCRT) + { "mbstowcs_s", func_mbstowcs_s }, { "_vscprintf", func__vscprintf }, { "_vscwprintf", func__vscwprintf }, #elif defined(TEST_NTDLL)
12 years, 3 months
1
0
0
0
[tkreuzer] 57342: [CRT] - Fix some MSVC warnings - Comment out files with duplicated functions See CORE-6684
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 19 21:03:27 2012 New Revision: 57342 URL:
http://svn.reactos.org/svn/reactos?rev=57342&view=rev
Log: [CRT] - Fix some MSVC warnings - Comment out files with duplicated functions See CORE-6684 Modified: trunk/reactos/lib/sdk/crt/crt.cmake trunk/reactos/lib/sdk/crt/stdio/file.c Modified: trunk/reactos/lib/sdk/crt/crt.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.cmake?rev=…
============================================================================== --- trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] Wed Sep 19 21:03:27 2012 @@ -187,9 +187,9 @@ startup/mingw_helpers.c startup/natstart.c startup/charmax.c - startup/merr.c - startup/atonexit.c - startup/txtmode.c + #startup/merr.c + #startup/atonexit.c + #startup/txtmode.c startup/pesect.c startup/tlsmcrt.c startup/tlsthrd.c Modified: trunk/reactos/lib/sdk/crt/stdio/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/file.c?r…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Wed Sep 19 21:03:27 2012 @@ -309,7 +309,7 @@ unsigned int i; FILE *file; - for (i = 3; i < max_streams; i++) + for (i = 3; i < (unsigned int)max_streams; i++) { file = get_file(i); if (!file) @@ -386,17 +386,17 @@ *handle_ptr = INVALID_HANDLE_VALUE; } wxflag_ptr++; handle_ptr++; - } + } return TRUE; } -/* INTERNAL: Set up all file descriptors, - * as well as default streams (stdin, stderr and stdout) +/* INTERNAL: Set up all file descriptors, + * as well as default streams (stdin, stderr and stdout) */ void msvcrt_init_io(void) { STARTUPINFOA si; - int i; + unsigned int i; ioinfo *fdinfo; InitializeCriticalSection(&file_cs); @@ -1017,7 +1017,7 @@ */ LONG CDECL _lseek(int fd, LONG offset, int whence) { - return _lseeki64(fd, offset, whence); + return (LONG)_lseeki64(fd, offset, whence); } /********************************************************************* @@ -1563,7 +1563,7 @@ else creation = OPEN_EXISTING; } - + switch( shflags ) { case _SH_DENYRW: @@ -2339,12 +2339,12 @@ wcp = (char *)&wc; for(i=0; i<sizeof(wc); i++) { - if (file->_cnt>0) + if (file->_cnt>0) { file->_cnt--; chp = file->_ptr++; wcp[i] = *chp; - } + } else { j = _filbuf(file); @@ -2363,7 +2363,7 @@ _unlock_file(file); return wc; } - + c = fgetc(file); if ((__mb_cur_max > 1) && isleadbyte(c)) { @@ -2470,7 +2470,7 @@ _lock_file(file); if(file->_cnt) { - int pcnt=(file->_cnt>wrcnt)? wrcnt: file->_cnt; + int pcnt=((unsigned)file->_cnt>wrcnt)? wrcnt: file->_cnt; memcpy(file->_ptr, ptr, pcnt); file->_cnt -= pcnt; file->_ptr += pcnt; @@ -2693,7 +2693,7 @@ /* first buffered data */ if(file->_cnt>0) { - int pcnt= (rcnt>file->_cnt)? file->_cnt:rcnt; + int pcnt= (rcnt>(unsigned int)file->_cnt)? file->_cnt:rcnt; memcpy(ptr, file->_ptr, pcnt); file->_cnt -= pcnt; file->_ptr += pcnt; @@ -2720,7 +2720,7 @@ } file->_cnt = _read(file->_file, file->_base, file->_bufsiz); file->_ptr = file->_base; - i = (file->_cnt<rcnt) ? file->_cnt : rcnt; + i = ((unsigned int)file->_cnt<rcnt) ? file->_cnt : rcnt; /* If the buffer fill reaches eof but fread wouldn't, clear eof. */ if (i > 0 && i < file->_cnt) { get_ioinfo(file->_file)->wxflag &= ~WX_ATEOF; @@ -2830,7 +2830,7 @@ /* Discard buffered input */ file->_cnt = 0; file->_ptr = file->_base; - + /* Reset direction of i/o */ if(file->_flag & _IORW) { file->_flag &= ~(_IOREAD|_IOWRT); @@ -2884,7 +2884,7 @@ */ LONG CDECL ftell(FILE* file) { - return _ftelli64(file); + return (LONG)_ftelli64(file); } /*********************************************************************
12 years, 3 months
1
0
0
0
[tkreuzer] 57341: [PSDK] - Add _Check_return_opt and _Check_return_wat_ annotations [WINE] - Add ok_size_t(), ok_char() and ok_wstr() to test.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 19 20:36:05 2012 New Revision: 57341 URL:
http://svn.reactos.org/svn/reactos?rev=57341&view=rev
Log: [PSDK] - Add _Check_return_opt and _Check_return_wat_ annotations [WINE] - Add ok_size_t(), ok_char() and ok_wstr() to test.h Modified: trunk/reactos/include/psdk/specstrings.h trunk/reactos/include/reactos/wine/test.h Modified: trunk/reactos/include/psdk/specstrings.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/specstrings.h…
============================================================================== --- trunk/reactos/include/psdk/specstrings.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/specstrings.h [iso-8859-1] Wed Sep 19 20:36:05 2012 @@ -60,3 +60,15 @@ #define __analysis_noreturn #endif + +#if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN) +#define _Check_return_opt_ _Check_return_ +#else +#define _Check_return_opt_ +#endif + +#if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN_WAT) +#define _Check_return_wat_ _Check_return_ +#else +#define _Check_return_wat_ +#endif Modified: trunk/reactos/include/reactos/wine/test.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/test.…
============================================================================== --- trunk/reactos/include/reactos/wine/test.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/test.h [iso-8859-1] Wed Sep 19 20:36:05 2012 @@ -646,11 +646,23 @@ #expression, (void*)(result), _value); \ } while (0) +#define ok_size_t(expression, result) \ + do { \ + size_t _value = (expression); \ + ok(_value == (result), "Wrong value for '%s', expected: " #result " (%p), got: %p\n", \ + #expression, (size_t)(result), _value); \ + } while (0) + +#define ok_char(expression, result) ok_hex(expression, result) + #define ok_err(error) \ ok(GetLastError() == (error), "Wrong last error. Expected " #error ", got %d\n", (int)GetLastError()) #define ok_str(x, y) \ ok(strcmp(x, y) == 0, "Wrong string. Expected '%s', got '%s'\n", y, x) + +#define ok_wstr(x, y) \ + ok(wcscmp(x, y) == 0, "Wrong string. Expected '%S', got '%S'\n", y, x) #define ok_long(expression, result) ok_hex(expression, result) #define ok_int(expression, result) ok_dec(expression, result)
12 years, 3 months
1
0
0
0
[ekohl] 57340: [LSASRV] LsarQueryInfromationPolicy: Check desired access depending on the information class.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Sep 19 15:33:48 2012 New Revision: 57340 URL:
http://svn.reactos.org/svn/reactos?rev=57340&view=rev
Log: [LSASRV] LsarQueryInfromationPolicy: Check desired access depending on the information class. Modified: trunk/reactos/dll/win32/lsasrv/lsarpc.c Modified: trunk/reactos/dll/win32/lsasrv/lsarpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsarpc.c?…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] Wed Sep 19 15:33:48 2012 @@ -188,6 +188,7 @@ PLSAPR_POLICY_INFORMATION *PolicyInformation) { PLSA_DB_OBJECT DbObject; + ACCESS_MASK DesiredAccess = 0; NTSTATUS Status; TRACE("LsarQueryInformationPolicy(%p,0x%08x,%p)\n", @@ -198,9 +199,34 @@ TRACE("*PolicyInformation %p\n", *PolicyInformation); } + switch (InformationClass) + { + case PolicyAuditLogInformation: + case PolicyAuditEventsInformation: + case PolicyAuditFullQueryInformation: + DesiredAccess = POLICY_VIEW_AUDIT_INFORMATION; + break; + + case PolicyPrimaryDomainInformation: + case PolicyAccountDomainInformation: + case PolicyLsaServerRoleInformation: + case PolicyReplicaSourceInformation: + case PolicyDefaultQuotaInformation: + DesiredAccess = POLICY_VIEW_LOCAL_INFORMATION; + break; + + case PolicyPdAccountInformation: + DesiredAccess = POLICY_GET_PRIVATE_INFORMATION; + break; + + default: + ERR("Invalid InformationClass!\n"); + return STATUS_INVALID_PARAMETER; + } + Status = LsapValidateDbObject(PolicyHandle, LsaDbPolicyObject, - 0, /* FIXME */ + DesiredAccess, &DbObject); if (!NT_SUCCESS(Status)) return Status; @@ -236,7 +262,7 @@ case PolicyAuditFullSetInformation: case PolicyAuditFullQueryInformation: case PolicyEfsInformation: - FIXME("category not implemented\n"); + FIXME("Information class not implemented\n"); Status = STATUS_UNSUCCESSFUL; break; }
12 years, 3 months
1
0
0
0
[ekohl] 57339: [IOLOGMSG] Build iologmsg.dll.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Sep 19 13:34:56 2012 New Revision: 57339 URL:
http://svn.reactos.org/svn/reactos?rev=57339&view=rev
Log: [IOLOGMSG] Build iologmsg.dll. Added: trunk/reactos/dll/win32/iologmsg/CMakeLists.txt (with props) Modified: trunk/reactos/cmake/baseaddress.cmake trunk/reactos/dll/win32/CMakeLists.txt trunk/reactos/include/reactos/mc/CMakeLists.txt Modified: trunk/reactos/cmake/baseaddress.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/baseaddress.cmake?re…
============================================================================== --- trunk/reactos/cmake/baseaddress.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/baseaddress.cmake [iso-8859-1] Wed Sep 19 13:34:56 2012 @@ -295,3 +295,4 @@ set(baseaddress_hid 0x70a30000) set(baseaddress_netevent 0x70a10000) set(baseaddress_tapiui 0x709b0000) +set(baseaddress_iologmsg 0x669a0000) Modified: trunk/reactos/dll/win32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/CMakeLists.txt?r…
============================================================================== --- trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] Wed Sep 19 13:34:56 2012 @@ -55,6 +55,7 @@ add_subdirectory(inetmib1) add_subdirectory(initpki) add_subdirectory(inseng) +add_subdirectory(iologmsg) add_subdirectory(iphlpapi) #add_subdirectory(iprtprio) # not built in trunk add_subdirectory(itircl) Added: trunk/reactos/dll/win32/iologmsg/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iologmsg/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/iologmsg/CMakeLists.txt (added) +++ trunk/reactos/dll/win32/iologmsg/CMakeLists.txt [iso-8859-1] Wed Sep 19 13:34:56 2012 @@ -1,0 +1,5 @@ +include_directories(${REACTOS_BINARY_DIR}/include/reactos) +add_library(iologmsg SHARED iologmsg.rc) +set_module_type(iologmsg win32dll ENTRYPOINT 0 UNICODE) +add_dependencies(iologmsg ntiologc) +add_cd_file(TARGET iologmsg DESTINATION reactos/system32 FOR all) Propchange: trunk/reactos/dll/win32/iologmsg/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/reactos/mc/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/mc/CMakeLi…
============================================================================== --- trunk/reactos/include/reactos/mc/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/include/reactos/mc/CMakeLists.txt [iso-8859-1] Wed Sep 19 13:34:56 2012 @@ -5,6 +5,7 @@ list(APPEND UNICODE_SOURCE errcodes.mc neteventmsg.mc + ntiologc.mc ntstatus.mc pciclass.mc)
12 years, 3 months
1
0
0
0
[ekohl] 57338: [SAMSRV/SYSSETUP] Use proper access rights in calls to LsaOpenPolicy.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Sep 19 12:59:47 2012 New Revision: 57338 URL:
http://svn.reactos.org/svn/reactos?rev=57338&view=rev
Log: [SAMSRV/SYSSETUP] Use proper access rights in calls to LsaOpenPolicy. Modified: trunk/reactos/dll/win32/samsrv/setup.c trunk/reactos/dll/win32/syssetup/security.c Modified: trunk/reactos/dll/win32/samsrv/setup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/setup.c?r…
============================================================================== --- trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] Wed Sep 19 12:59:47 2012 @@ -471,7 +471,7 @@ Status = LsaOpenPolicy(NULL, &ObjectAttributes, - POLICY_TRUST_ADMIN, + POLICY_VIEW_LOCAL_INFORMATION, &PolicyHandle); if (Status != STATUS_SUCCESS) { Modified: trunk/reactos/dll/win32/syssetup/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/securit…
============================================================================== --- trunk/reactos/dll/win32/syssetup/security.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/syssetup/security.c [iso-8859-1] Wed Sep 19 12:59:47 2012 @@ -38,7 +38,7 @@ Status = LsaOpenPolicy(NULL, &ObjectAttributes, - POLICY_TRUST_ADMIN, + POLICY_VIEW_LOCAL_INFORMATION | POLICY_TRUST_ADMIN, &PolicyHandle); if (Status != STATUS_SUCCESS) {
12 years, 3 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
24
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Results per page:
10
25
50
100
200