Fix possible OOB access for clicking tags
specify the signed type for indexing tags as intended for `tag >= 0` check. Signed-off-by: mortezadadgar <mortezadadgar97@gmail.com>
This commit is contained in:
parent
b069830640
commit
e1f8c63064
|
@ -181,7 +181,7 @@ void Bar::click(Monitor* mon, int x, int, int btn)
|
||||||
control = ClkWinTitle;
|
control = ClkWinTitle;
|
||||||
} else if (x > _layoutCmp.x) {
|
} else if (x > _layoutCmp.x) {
|
||||||
control = ClkLayoutSymbol;
|
control = ClkLayoutSymbol;
|
||||||
} else for (auto tag = _tags.size()-1; tag >= 0; tag--) {
|
} else for (int tag = _tags.size()-1; tag >= 0; tag--) {
|
||||||
if (x > _tags[tag].component.x) {
|
if (x > _tags[tag].component.x) {
|
||||||
control = ClkTagBar;
|
control = ClkTagBar;
|
||||||
arg.ui = 1<<tag;
|
arg.ui = 1<<tag;
|
||||||
|
|
Loading…
Reference in New Issue