Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
build
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
lf
build
Commits
e3aab32a
Commit
e3aab32a
authored
12 years ago
by
Diego Wilson
Committed by
Gerrit - the friendly Code Review server
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add sanity checks of input of mdp_ppp_solid_fill()
Change-Id: I7a9341fe9a24b39e36f43e32cf7fbb8c9607994d
parent
7c5b2338
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
patch/ics_chocolate/kernel/kernel-add-fillcolor.patch
+15
-3
15 additions, 3 deletions
patch/ics_chocolate/kernel/kernel-add-fillcolor.patch
patch/ics_strawberry/kernel/kernel-add-fillcolor.patch
+17
-5
17 additions, 5 deletions
patch/ics_strawberry/kernel/kernel-add-fillcolor.patch
with
32 additions
and
8 deletions
patch/ics_chocolate/kernel/kernel-add-fillcolor.patch
+
15
−
3
View file @
e3aab32a
diff --git a/drivers/video/msm/mdp_ppp.c b/drivers/video/msm/mdp_ppp.c
index a6f03ba..
60504a0
100644
index a6f03ba..
2100001
100644
--- a/drivers/video/msm/mdp_ppp.c
+++ b/drivers/video/msm/mdp_ppp.c
@@ -1313,40 +1313,1
83
@@
void put_img(struct file *p_src_file)
@@ -1313,40 +1313,1
95
@@
void put_img(struct file *p_src_file)
#endif
}
...
...
@@ -20,6 +20,18 @@ index a6f03ba..60504a0 100644
+ struct msm_fb_data_type *mfd = info->par;
+ dest1 = NULL;
+
+ if (req == NULL) {
+ printk(KERN_ERR "mdp_ppp_solid_fill: null request!\n");
+ return -EINVAL;
+ }
+
+ if ((req->dst_rect.x < 0) || (req->dst_rect.y < 0) ||
+ (req->dst_rect.w > req->dst.width) ||
+ (req->dst_rect.h > req->dst.height)) {
+ printk(KERN_ERR "mdp_ppp_solid_fill: Invalid dst rect!\n");
+ return -EINVAL;
+ }
+
+ down(&mdp_ppp_mutex);
+ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
+ req->dst_rect.w = ((req->dst_rect.w/2) * 2);
...
...
@@ -211,7 +223,7 @@ index a6f03ba..60504a0 100644
if (mdp_ppp_verify_req(req)) {
printk(KERN_ERR "mdp_ppp: invalid image!\n");
put_img(p_src_file);
@@ -1589,3 +17
32
,40 @@
int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req)
@@ -1589,3 +17
44
,40 @@
int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req)
put_img(p_dst_file);
return 0;
}
...
...
This diff is collapsed.
Click to expand it.
patch/ics_strawberry/kernel/kernel-add-fillcolor.patch
+
17
−
5
View file @
e3aab32a
diff --git a/drivers/video/msm/mdp_ppp.c b/drivers/video/msm/mdp_ppp.c
index
4009ffc..2bd09db
100644
index
91fa68f..f5e843c
100644
--- a/drivers/video/msm/mdp_ppp.c
+++ b/drivers/video/msm/mdp_ppp.c
@@ -1572,6 +1572,1
6
7 @@
static int mdp_ppp_blit_addr(struct fb_info *info, struct mdp_blit_req *req,
@@ -1572,6 +1572,17
9
@@
static int mdp_ppp_blit_addr(struct fb_info *info, struct mdp_blit_req *req,
return 0;
}
...
...
@@ -20,6 +20,18 @@ index 4009ffc..2bd09db 100644
+ struct msm_fb_data_type *mfd = info->par;
+ dest1 = NULL;
+
+ if (req == NULL) {
+ printk(KERN_ERR "mdp_ppp_solid_fill: null request!\n");
+ return -EINVAL;
+ }
+
+ if ((req->dst_rect.x < 0) || (req->dst_rect.y < 0) ||
+ (req->dst_rect.w > req->dst.width) ||
+ (req->dst_rect.h > req->dst.height)) {
+ printk(KERN_ERR "mdp_ppp_solid_fill: Invalid dst rect!\n");
+ return -EINVAL;
+ }
+
+ down(&mdp_ppp_mutex);
+ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
+ req->dst_rect.w = ((req->dst_rect.w/2) * 2);
...
...
@@ -170,7 +182,7 @@ index 4009ffc..2bd09db 100644
int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req)
{
unsigned long src_start, dst_start;
@@ -1579,14 +17
40
,16 @@
int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req)
@@ -1579,14 +17
52
,16 @@
int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req)
unsigned long dst_len = 0;
struct file *p_src_file = 0 , *p_dst_file = 0;
...
...
@@ -194,7 +206,7 @@ index 4009ffc..2bd09db 100644
}
if (req->flags & MDP_BLIT_DST_GEM)
get_gem_img(&req->dst, &dst_start, &dst_len);
@@ -1599,6 +17
62
,10 @@
int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req)
@@ -1599,6 +17
74
,10 @@
int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req)
return -EINVAL;
}
...
...
@@ -206,7 +218,7 @@ index 4009ffc..2bd09db 100644
dst_len, p_src_file, p_dst_file);
}
diff --git a/include/linux/msm_mdp.h b/include/linux/msm_mdp.h
index
12307e0..fab40ab
100644
index
69bed10..be40938
100644
--- a/include/linux/msm_mdp.h
+++ b/include/linux/msm_mdp.h
@@ -124,6 +124,7 @@
enum {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment