xcap icon indicating copy to clipboard operation
xcap copied to clipboard

Possible race condition in get_window_title

Open gucki opened this issue 2 months ago • 0 comments

I was looking a bit into the code because I noticed the title of a window's struct is not updated. While looking at the code I saw that first the length of the window title is retrieved, then a vec of that size is created and the title loaded into it. Imo this is prone to a race condition: if the window title length changes during the calls (which is of course very unlikely in that short timeframe, but still possible). Or am I mistaken?

gucki avatar Apr 15 '24 15:04 gucki