Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4f34b189
Commit
4f34b189
authored
Apr 16, 2001
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 16, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some crash on bad parameter conditions.
parent
54dfe595
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
8 deletions
+31
-8
lstr.c
dlls/user/lstr.c
+31
-8
No files found.
dlls/user/lstr.c
View file @
4f34b189
...
...
@@ -15,15 +15,26 @@
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winerror.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "wine/unicode.h"
#include "wine/exception.h"
#include "heap.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
resource
);
/* filter for page-fault exceptions */
static
WINE_EXCEPTION_FILTER
(
page_fault
)
{
if
(
GetExceptionCode
()
==
EXCEPTION_ACCESS_VIOLATION
||
GetExceptionCode
()
==
EXCEPTION_PRIV_INSTRUCTION
)
return
EXCEPTION_EXECUTE_HANDLER
;
return
EXCEPTION_CONTINUE_SEARCH
;
}
/***********************************************************************
* AnsiToOem16 (KEYBOARD.5)
*/
...
...
@@ -334,19 +345,24 @@ BOOL WINAPI OemToCharW( LPCSTR s, LPWSTR d )
*/
LPSTR
WINAPI
CharLowerA
(
LPSTR
x
)
{
LPSTR
s
;
if
(
!
HIWORD
(
x
))
return
(
LPSTR
)
tolower
((
char
)(
int
)
x
)
;
if
(
HIWORD
(
x
))
__TRY
{
s
=
x
;
LPSTR
s
=
x
;
while
(
*
s
)
{
*
s
=
tolower
(
*
s
);
s
++
;
}
return
x
;
}
else
return
(
LPSTR
)
tolower
((
char
)(
int
)
x
);
__EXCEPT
(
page_fault
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
NULL
;
}
__ENDTRY
return
x
;
}
...
...
@@ -356,7 +372,9 @@ LPSTR WINAPI CharLowerA(LPSTR x)
*/
LPSTR
WINAPI
CharUpperA
(
LPSTR
x
)
{
if
(
HIWORD
(
x
))
if
(
!
HIWORD
(
x
))
return
(
LPSTR
)
toupper
((
char
)(
int
)
x
);
__TRY
{
LPSTR
s
=
x
;
while
(
*
s
)
...
...
@@ -364,9 +382,14 @@ LPSTR WINAPI CharUpperA(LPSTR x)
*
s
=
toupper
(
*
s
);
s
++
;
}
return
x
;
}
return
(
LPSTR
)
toupper
((
char
)(
int
)
x
);
__EXCEPT
(
page_fault
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
NULL
;
}
__ENDTRY
return
x
;
}
...
...
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