This is a resend. Is there anything that could be improved in the patch to make it acceptable?
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/advapi32/tests/security.c | 1 + dlls/sechost/security.c | 3 +++ 2 files changed, 4 insertions(+)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index ed91ccc39d3..1a874de75c4 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -4240,6 +4240,7 @@ 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;;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 ))
Dmitry Timoshkov dmitry@baikal.ru writes:
This is a resend. Is there anything that could be improved in the patch to make it acceptable?
Some more tests would be good. In particular I wonder what happens if the number has a leading zero.