From 3f49137f9027f0c2cf8b0318548a69505c4708ab Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 5 Feb 2012 22:23:13 +0000 Subject: [PATCH] Check for the right return value from sscanf. --- layout-custom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout-custom.c b/layout-custom.c index 88fcde1f..8a4f08dc 100644 --- a/layout-custom.c +++ b/layout-custom.c @@ -207,7 +207,7 @@ layout_construct(struct layout_cell *lcparent, const char **layout) if (!isdigit((u_char) **layout)) return (NULL); - if (sscanf(*layout, "%ux%u,%u,%u,%*u", &sx, &sy, &xoff, &yoff) != 5 && + if (sscanf(*layout, "%ux%u,%u,%u,%*u", &sx, &sy, &xoff, &yoff) != 4 && sscanf(*layout, "%ux%u,%u,%u", &sx, &sy, &xoff, &yoff) != 4) return (NULL); -- 2.11.4.GIT