BSlider: Copy the UpdateText inside UpdateTextChanged.
We can't rely on it not changing between calls, especially as MaxUpdateTextWidth() changes the value and re-gets it, and that's called at the end of this method always. So we need to keep our own copy rather than using the one that's owned by the subclass. Fixes a use-after-free uncovered by the guarded heap in VolumeSlider, reported in #19493.
This commit is contained in:
@@ -201,7 +201,7 @@ private:
|
||||
|
||||
char* fMinLimitLabel;
|
||||
char* fMaxLimitLabel;
|
||||
const char* fUpdateText;
|
||||
char* fUpdateText;
|
||||
|
||||
int32 fMinValue;
|
||||
int32 fMaxValue;
|
||||
|
||||
Reference in New Issue
Block a user