mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Check for the right return value from sscanf.
This commit is contained in:
parent
fe7cf0ba90
commit
3f49137f90
@ -207,7 +207,7 @@ layout_construct(struct layout_cell *lcparent, const char **layout)
|
|||||||
|
|
||||||
if (!isdigit((u_char) **layout))
|
if (!isdigit((u_char) **layout))
|
||||||
return (NULL);
|
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)
|
sscanf(*layout, "%ux%u,%u,%u", &sx, &sy, &xoff, &yoff) != 4)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user