[PATCH weston 06/11] compositor-drm: Use a format width parameter for the modeline sscanf

Rob Bradford robert.bradford at intel.com
Fri Jul 26 08:29:40 PDT 2013


From: Rob Bradford <rob at linux.intel.com>

---
 src/compositor-drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index cf626ba..c7d6c04 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1673,7 +1673,7 @@ parse_modeline(const char *s, drmModeModeInfo *mode)
 	mode->vrefresh = 0;
 	mode->flags = 0;
 
-	if (sscanf(s, "%f %hd %hd %hd %hd %hd %hd %hd %hd %s %s",
+	if (sscanf(s, "%f %hd %hd %hd %hd %hd %hd %hd %hd %15s %15s",
 		   &fclock,
 		   &mode->hdisplay,
 		   &mode->hsync_start,
-- 
1.8.3.1



More information about the wayland-devel mailing list