All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] drm: off by one in drm_edid.c
@ 2010-05-07  8:38 Dan Carpenter
  2010-05-10 16:03 ` Adam Jackson
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-07  8:38 UTC (permalink / raw)
  To: David Airlie; +Cc: Dave Airlie, dri-devel

m == num_est3_modes is one past the end of the est3_modes[]. 

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 7188674..46447b0 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1383,7 +1383,7 @@ drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing)
 	for (i = 0; i < 6; i++) {
 		for (j = 7; j > 0; j--) {
 			m = (i * 8) + (7 - j);
-			if (m > num_est3_modes)
+			if (m >= num_est3_modes)
 				break;
 			if (est[i] & (1 << j)) {
 				mode = drm_find_dmt(connector->dev,

------------------------------------------------------------------------------

--

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch -next] drm: off by one in drm_edid.c
  2010-05-07  8:38 [patch -next] drm: off by one in drm_edid.c Dan Carpenter
@ 2010-05-10 16:03 ` Adam Jackson
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Jackson @ 2010-05-10 16:03 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: David Airlie, Dave Airlie, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 768 bytes --]

On Fri, 2010-05-07 at 10:38 +0200, Dan Carpenter wrote:
> m == num_est3_modes is one past the end of the est3_modes[]. 
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 7188674..46447b0 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -1383,7 +1383,7 @@ drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing)
>  	for (i = 0; i < 6; i++) {
>  		for (j = 7; j > 0; j--) {
>  			m = (i * 8) + (7 - j);
> -			if (m > num_est3_modes)
> +			if (m >= num_est3_modes)
>  				break;
>  			if (est[i] & (1 << j)) {
>  				mode = drm_find_dmt(connector->dev,

Reviewed-by: Adam Jackson <ajax@redhat.com>

- ajax

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 80 bytes --]

------------------------------------------------------------------------------


[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-10 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07  8:38 [patch -next] drm: off by one in drm_edid.c Dan Carpenter
2010-05-10 16:03 ` Adam Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.