From cfa6ac9161095dfaf4d9eb3cad3b80dc82af79e7 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Wed, 15 Feb 2012 19:30:51 +0000 Subject: [PATCH] Sync OpenBSD patchset 1026: 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 5e1d2ce2..85ae0a65 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);