v2: Add a test with leading zero.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/advapi32/tests/security.c | 2 ++ dlls/sechost/security.c | 3 +++ 2 files changed, 5 insertions(+)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index ed91ccc39d3..547daef2bd6 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -4240,6 +4240,8 @@ static void test_ConvertStringSecurityDescriptor(void) { "D:(D;;GA;;;WD )", SDDL_REVISION_1, TRUE }, /* test ACE string access rights */ { "D:(A;;GA;;;WD)", SDDL_REVISION_1, TRUE }, + { "D:(A;;1;;;WD)", SDDL_REVISION_1, TRUE }, + { "D:(A;;01;;;WD)", SDDL_REVISION_1, TRUE }, { "D:(A;;GRGWGX;;;WD)", SDDL_REVISION_1, TRUE }, { "D:(A;;RCSDWDWO;;;WD)", SDDL_REVISION_1, TRUE }, { "D:(A;;RPWPCCDCLCSWLODTCR;;;WD)", SDDL_REVISION_1, TRUE }, diff --git a/dlls/sechost/security.c b/dlls/sechost/security.c index 6916b3ad662..f6fcffd9cfc 100644 --- a/dlls/sechost/security.c +++ b/dlls/sechost/security.c @@ -903,6 +903,9 @@ static DWORD parse_ace_right( const WCHAR **string_ptr ) if (string[0] == '0' && string[1] == 'x') return wcstoul( string, (WCHAR **)string_ptr, 16 );
+ if (iswdigit( string[0] )) + return wcstoul( string, (WCHAR **)string_ptr, 10 ); + for (i = 0; i < ARRAY_SIZE(ace_rights); ++i) { if (!wcsncmp( string, ace_rights[i].str, 2 ))