Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
21246938
Commit
21246938
authored
Sep 17, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Don't use exception handler when decoding time zone, caller already does.
parent
ad949822
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
41 deletions
+31
-41
decode.c
dlls/crypt32/decode.c
+31
-41
No files found.
dlls/crypt32/decode.c
View file @
21246938
...
...
@@ -3443,65 +3443,55 @@ static BOOL WINAPI CRYPT_AsnDecodeEnumerated(DWORD dwCertEncodingType,
static
BOOL
CRYPT_AsnDecodeTimeZone
(
const
BYTE
*
pbEncoded
,
DWORD
len
,
SYSTEMTIME
*
sysTime
)
{
BOOL
ret
;
BOOL
ret
=
TRUE
;
__TRY
if
(
len
>=
3
&&
(
*
pbEncoded
==
'+'
||
*
pbEncoded
==
'-'
))
{
ret
=
TRUE
;
if
(
len
>=
3
&&
(
*
pbEncoded
==
'+'
||
*
pbEncoded
==
'-'
))
{
WORD
hours
,
minutes
=
0
;
BYTE
sign
=
*
pbEncoded
++
;
WORD
hours
,
minutes
=
0
;
BYTE
sign
=
*
pbEncoded
++
;
len
--
;
CRYPT_TIME_GET_DIGITS
(
pbEncoded
,
len
,
2
,
hours
);
if
(
ret
&&
hours
>=
24
)
len
--
;
CRYPT_TIME_GET_DIGITS
(
pbEncoded
,
len
,
2
,
hours
);
if
(
ret
&&
hours
>=
24
)
{
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
}
else
if
(
len
>=
2
)
{
CRYPT_TIME_GET_DIGITS
(
pbEncoded
,
len
,
2
,
minutes
);
if
(
ret
&&
minutes
>=
60
)
{
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
}
else
if
(
len
>=
2
)
}
if
(
ret
)
{
if
(
sign
==
'+'
)
{
CRYPT_TIME_GET_DIGITS
(
pbEncoded
,
len
,
2
,
minutes
);
if
(
ret
&&
minutes
>=
60
)
{
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
}
sysTime
->
wHour
+=
hours
;
sysTime
->
wMinute
+=
minutes
;
}
if
(
ret
)
else
{
if
(
sign
==
'+'
)
if
(
hours
>
sysTime
->
wHour
)
{
sysTime
->
w
Hour
+=
hours
;
sysTime
->
w
Minute
+=
minutes
;
sysTime
->
w
Day
--
;
sysTime
->
w
Hour
=
24
-
(
hours
-
sysTime
->
wHour
)
;
}
else
sysTime
->
wHour
-=
hours
;
if
(
minutes
>
sysTime
->
wMinute
)
{
if
(
hours
>
sysTime
->
wHour
)
{
sysTime
->
wDay
--
;
sysTime
->
wHour
=
24
-
(
hours
-
sysTime
->
wHour
);
}
else
sysTime
->
wHour
-=
hours
;
if
(
minutes
>
sysTime
->
wMinute
)
{
sysTime
->
wHour
--
;
sysTime
->
wMinute
=
60
-
(
minutes
-
sysTime
->
wMinute
);
}
else
sysTime
->
wMinute
-=
minutes
;
sysTime
->
wHour
--
;
sysTime
->
wMinute
=
60
-
(
minutes
-
sysTime
->
wMinute
);
}
else
sysTime
->
wMinute
-=
minutes
;
}
}
}
__EXCEPT_PAGE_FAULT
{
SetLastError
(
STATUS_ACCESS_VIOLATION
);
ret
=
FALSE
;
}
__ENDTRY
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment