Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
frameworks_native
Commits
07cd4cdf
Commit
07cd4cdf
authored
8 years ago
by
Pablo Ceballos
Committed by
gitbuildkicker
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Region: Detect malicious overflow in unflatten
Bug 29983260 Change-Id: Ib6e1cb8ae279010c5e9960aaa03513f55b7d873b
parent
54cb02ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
libs/ui/Region.cpp
libs/ui/Region.cpp
+5
-0
No files found.
libs/ui/Region.cpp
View file @
07cd4cdf
...
...
@@ -795,6 +795,11 @@ status_t Region::unflatten(void const* buffer, size_t size) {
return
NO_MEMORY
;
}
if
(
numRects
>
(
UINT32_MAX
/
sizeof
(
Rect
)))
{
android_errorWriteWithInfoLog
(
0x534e4554
,
"29983260"
,
-
1
,
NULL
,
0
);
return
NO_MEMORY
;
}
Region
result
;
result
.
mStorage
.
clear
();
for
(
size_t
r
=
0
;
r
<
numRects
;
++
r
)
{
...
...
This diff is collapsed.
Click to expand it.
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