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
cbd5811e
Commit
cbd5811e
authored
Jan 08, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Better support for OOM conditions when creating source file table.
parent
c22eaccd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
source.c
dlls/dbghelp/source.c
+7
-3
No files found.
dlls/dbghelp/source.c
View file @
cbd5811e
...
@@ -73,27 +73,31 @@ unsigned source_new(struct module* module, const char* base, const char* name)
...
@@ -73,27 +73,31 @@ unsigned source_new(struct module* module, const char* base, const char* name)
}
}
if
(
!
module
->
sources
||
(
ret
=
source_find
(
module
,
full
))
==
(
unsigned
)
-
1
)
if
(
!
module
->
sources
||
(
ret
=
source_find
(
module
,
full
))
==
(
unsigned
)
-
1
)
{
{
char
*
new
;
int
len
=
strlen
(
full
)
+
1
;
int
len
=
strlen
(
full
)
+
1
;
if
(
module
->
sources_used
+
len
+
1
>
module
->
sources_alloc
)
if
(
module
->
sources_used
+
len
+
1
>
module
->
sources_alloc
)
{
{
if
(
!
module
->
sources
)
if
(
!
module
->
sources
)
{
{
module
->
sources_alloc
=
(
module
->
sources_used
+
len
+
1
+
255
)
&
~
255
;
module
->
sources_alloc
=
(
module
->
sources_used
+
len
+
1
+
255
)
&
~
255
;
module
->
sources
=
HeapAlloc
(
GetProcessHeap
(),
0
,
module
->
sources_alloc
);
new
=
HeapAlloc
(
GetProcessHeap
(),
0
,
module
->
sources_alloc
);
}
}
else
else
{
{
module
->
sources_alloc
=
max
(
module
->
sources_alloc
*
2
,
module
->
sources_alloc
=
max
(
module
->
sources_alloc
*
2
,
(
module
->
sources_used
+
len
+
1
+
255
)
&
~
255
);
(
module
->
sources_used
+
len
+
1
+
255
)
&
~
255
);
module
->
sources
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
module
->
sources
,
new
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
module
->
sources
,
module
->
sources_alloc
);
module
->
sources_alloc
);
}
}
if
(
!
new
)
goto
done
;
module
->
sources
=
new
;
}
}
ret
=
module
->
sources_used
;
ret
=
module
->
sources_used
;
memcpy
(
module
->
sources
+
module
->
sources_used
,
full
,
len
);
memcpy
(
module
->
sources
+
module
->
sources_used
,
full
,
len
);
module
->
sources_used
+=
len
;
module
->
sources_used
+=
len
;
module
->
sources
[
module
->
sources_used
]
=
'\0'
;
module
->
sources
[
module
->
sources_used
]
=
'\0'
;
}
}
done:
HeapFree
(
GetProcessHeap
(),
0
,
tmp
);
HeapFree
(
GetProcessHeap
(),
0
,
tmp
);
return
ret
;
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