Skip to content

Commit b4ea507

Browse files
committed
Fix buffer overflow in "ydotool mousemove"
1 parent 0ea3273 commit b4ea507

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Client/tool_mousemove.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,18 @@ int tool_mousemove(int argc, char **argv) {
107107
is_wheel = 1;
108108
break;
109109
case 'x':
110+
if (i >= 2) {
111+
show_help();
112+
return 1;
113+
}
110114
pos[0] = strtol(optarg, NULL, 10);
111115
i++;
112116
break;
113117
case 'y':
118+
if (i >= 2) {
119+
show_help();
120+
return 1;
121+
}
114122
pos[1] = strtol(optarg, NULL, 10);
115123
i++;
116124
break;

0 commit comments

Comments
 (0)