aboutsummaryrefslogtreecommitdiff
path: root/layout-custom.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-02-15 19:30:51 +0000
committerTiago Cunha <tcunha@gmx.com>2012-02-15 19:30:51 +0000
commitcfa6ac9161095dfaf4d9eb3cad3b80dc82af79e7 (patch)
tree6ad0072daa7f46ac690c3e6e71e461820b0678f0 /layout-custom.c
parent6e6e8046ba4af673570342547ebfb2d264350f5f (diff)
downloadrtmux-cfa6ac9161095dfaf4d9eb3cad3b80dc82af79e7.tar.gz
rtmux-cfa6ac9161095dfaf4d9eb3cad3b80dc82af79e7.tar.bz2
rtmux-cfa6ac9161095dfaf4d9eb3cad3b80dc82af79e7.zip
Sync OpenBSD patchset 1026:
Check for the right return value from sscanf.
Diffstat (limited to 'layout-custom.c')
-rw-r--r--layout-custom.c2
1 files changed, 1 insertions, 1 deletions
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);