~raphi/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Fix possible OOB access for clicking tags

Details
Message ID
<20230801061553.32083-1-mortezadadgar97@gmail.com>
DKIM signature
missing
Download raw message
Patch: +1 -1
specify the signed type for indexing tags as intended
for `tag >= 0` check.

Signed-off-by: mortezadadgar <mortezadadgar97@gmail.com>
---
 src/bar.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bar.cpp b/src/bar.cpp
index 4fda8b0..18a0b63 100644
--- a/src/bar.cpp
+++ b/src/bar.cpp
@@ -181,7 +181,7 @@ void Bar::click(Monitor* mon, int x, int, int btn)
		control = ClkWinTitle;
	} else if (x > _layoutCmp.x) {
		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) {
			control = ClkTagBar;
			arg.ui = 1<<tag;
-- 
2.41.0
Details
Message ID
<0a782dea-0210-456a-bb32-5d99c2cf23bf@app.fastmail.com>
In-Reply-To
<20230801061553.32083-1-mortezadadgar97@gmail.com> (view parent)
DKIM signature
missing
Download raw message
Good catch, thanks.

To git.sr.ht:~raphi/somebar
   b069830..e1f8c63  master -> master
Reply to thread Export thread (mbox)