Skip to content

Commit

Permalink
OMAPFB: fix parsing of vram parameter
Browse files Browse the repository at this point in the history
omapfb_parse_vram_param()'s check for end pointer returned from
simple_strtoul() is wrong, causing the code to bug if the second or
later vram parameters are non-parseable, for example
"omapfb.vram=0:2M,:5M".

However, even in that case the code will most likely bail out with
-EINVAL in the following checks, so the bug is probably not a fatal one.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Hein Tibosch <hein_tibosch@yahoo.es>
  • Loading branch information
Tomi Valkeinen committed May 11, 2012
1 parent b3e68d3 commit 3a028bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/omap2/omapfb/omapfb-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ static int omapfb_parse_vram_param(const char *param, int max_entries,

fbnum = simple_strtoul(p, &p, 10);

if (p == param)
if (p == start)
return -EINVAL;

if (*p != ':')
Expand Down

0 comments on commit 3a028bb

Please sign in to comment.