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
6c2eae25
Commit
6c2eae25
authored
Aug 19, 2005
by
Marcus Meissner
Committed by
Alexandre Julliard
Aug 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect GlobalAddAtomA string handling by exception handler (for
broken programs).
parent
88bddd7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
atom.c
dlls/kernel/atom.c
+22
-1
No files found.
dlls/kernel/atom.c
View file @
6c2eae25
...
@@ -38,6 +38,8 @@
...
@@ -38,6 +38,8 @@
#include "winbase.h"
#include "winbase.h"
#include "winerror.h"
#include "winerror.h"
#include "wine/exception.h"
#include "excpt.h"
#include "wine/server.h"
#include "wine/server.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
#include "kernel_private.h"
#include "kernel_private.h"
...
@@ -48,6 +50,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(atom);
...
@@ -48,6 +50,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(atom);
#define MAX_ATOM_LEN 255
#define MAX_ATOM_LEN 255
/* filter for page-fault exceptions */
static
WINE_EXCEPTION_FILTER
(
page_fault
)
{
if
(
GetExceptionCode
()
==
EXCEPTION_ACCESS_VIOLATION
)
return
EXCEPTION_EXECUTE_HANDLER
;
return
EXCEPTION_CONTINUE_SEARCH
;
}
static
struct
atom_table
*
get_local_table
(
DWORD
entries
)
static
struct
atom_table
*
get_local_table
(
DWORD
entries
)
{
{
static
struct
atom_table
*
local_table
;
static
struct
atom_table
*
local_table
;
...
@@ -183,7 +193,18 @@ static ATOM ATOM_AddAtomA( LPCSTR str, struct atom_table* table )
...
@@ -183,7 +193,18 @@ static ATOM ATOM_AddAtomA( LPCSTR str, struct atom_table* table )
*/
*/
ATOM
WINAPI
GlobalAddAtomA
(
LPCSTR
str
/* [in] String to add */
)
ATOM
WINAPI
GlobalAddAtomA
(
LPCSTR
str
/* [in] String to add */
)
{
{
return
ATOM_AddAtomA
(
str
,
NULL
);
ATOM
ret
;
__TRY
{
ret
=
ATOM_AddAtomA
(
str
,
NULL
);
}
__EXCEPT
(
page_fault
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
__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