diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2023-02-19 21:38:21 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2023-02-19 22:39:24 -0600 |
| commit | 26adc0c6bf1e4aafe6dc261f8aca09636ca63912 (patch) | |
| tree | 8eff96f6ab8f3823a54617004cb0729ff148d945 /src | |
| parent | a8a0dde828c474067cb92fd9cfec85372ab4160e (diff) | |
| download | wix-26adc0c6bf1e4aafe6dc261f8aca09636ca63912.tar.gz wix-26adc0c6bf1e4aafe6dc261f8aca09636ca63912.tar.bz2 wix-26adc0c6bf1e4aafe6dc261f8aca09636ca63912.zip | |
Fix double-free bugs in thmutil.
Fixes 7231
Diffstat (limited to 'src')
3 files changed, 57 insertions, 3 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp index 7bd98a1a..7938cd0b 100644 --- a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp | |||
| @@ -3752,7 +3752,7 @@ static HRESULT ParseActions( | |||
| 3752 | 3752 | ||
| 3753 | ++i; | 3753 | ++i; |
| 3754 | ReleaseNullBSTR(bstrType); | 3754 | ReleaseNullBSTR(bstrType); |
| 3755 | ReleaseObject(pixnChild); | 3755 | ReleaseNullObject(pixnChild); |
| 3756 | } | 3756 | } |
| 3757 | } | 3757 | } |
| 3758 | 3758 | ||
| @@ -3984,8 +3984,8 @@ static HRESULT ParseRadioButtons( | |||
| 3984 | pControl->fLastRadioButton = TRUE; | 3984 | pControl->fLastRadioButton = TRUE; |
| 3985 | } | 3985 | } |
| 3986 | 3986 | ||
| 3987 | ReleaseObject(pixnl); | 3987 | ReleaseNullObject(pixnl); |
| 3988 | ReleaseObject(pixnRadioButtons); | 3988 | ReleaseNullObject(pixnRadioButtons); |
| 3989 | } | 3989 | } |
| 3990 | 3990 | ||
| 3991 | LExit: | 3991 | LExit: |
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml index c890d7df..a5198a13 100644 --- a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml | |||
| @@ -160,6 +160,33 @@ There are currently four states for a button: default, focus, hover, and selecte | |||
| 160 | <Text>Back</Text> | 160 | <Text>Back</Text> |
| 161 | <ChangePageAction Page="Progressbar" /> | 161 | <ChangePageAction Page="Progressbar" /> |
| 162 | </Button> | 162 | </Button> |
| 163 | <Button Name="RadioButtonsButton" X="-183" Y="-11" Width="75" Height="23" TabStop="yes" FontId="Default"> | ||
| 164 | <Text>Next</Text> | ||
| 165 | <ChangePageAction Page="RadioButtons" /> | ||
| 166 | </Button> | ||
| 167 | </Page> | ||
| 168 | <Page Name="RadioButtons"> | ||
| 169 | <Label X="6" Y="6" Width="-6" Height="43" FontId="Default"> | ||
| 170 | This page has two groups of radio buttons. Only one value should be able to be selected for each group. A value should be able to be selected for both groups. | ||
| 171 | </Label> | ||
| 172 | <Label X="6" Y="50" Width="-6" Height="13" FontId="Default"> | ||
| 173 | Choice #1: | ||
| 174 | </Label> | ||
| 175 | <RadioButtons Name="CHOICE"> | ||
| 176 | <RadioButton Height="30" Width="30" X="33" Y="68" Value="1" /> | ||
| 177 | <RadioButton Height="30" Width="30" X="33" Y="103" Value="2" /> | ||
| 178 | </RadioButtons> | ||
| 179 | <Label X="6" Y="138" Width="-6" Height="13" FontId="Default"> | ||
| 180 | Choice #2: | ||
| 181 | </Label> | ||
| 182 | <RadioButtons Name="CHOICE2"> | ||
| 183 | <RadioButton Height="30" Width="130" X="33" Y="156" Value="1">One</RadioButton> | ||
| 184 | <RadioButton Height="30" Width="130" X="33" Y="191" Value="2">Two</RadioButton> | ||
| 185 | </RadioButtons> | ||
| 186 | <Button Name="RadioButtonsBackButton" X="-269" Y="-11" Width="75" Height="23" TabStop="yes" FontId="Default"> | ||
| 187 | <Text>Back</Text> | ||
| 188 | <ChangePageAction Page="Billboard" /> | ||
| 189 | </Button> | ||
| 163 | </Page> | 190 | </Page> |
| 164 | <Button Name="StartButton" X="-97" Y="-11" Width="75" Height="23" TabStop="yes" FontId="Default" Visible="yes"> | 191 | <Button Name="StartButton" X="-97" Y="-11" Width="75" Height="23" TabStop="yes" FontId="Default" Visible="yes"> |
| 165 | <Text>Start</Text> | 192 | <Text>Start</Text> |
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml index 37757e64..bb91d3ce 100644 --- a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml | |||
| @@ -160,6 +160,33 @@ There are currently four states for a button: default, focus, hover, and selecte | |||
| 160 | <Text>Back</Text> | 160 | <Text>Back</Text> |
| 161 | <ChangePageAction Page="Progressbar" /> | 161 | <ChangePageAction Page="Progressbar" /> |
| 162 | </Button> | 162 | </Button> |
| 163 | <Button Name="RadioButtonsButton" X="-183" Y="-11" Width="75" Height="23" TabStop="yes" FontId="Default"> | ||
| 164 | <Text>Next</Text> | ||
| 165 | <ChangePageAction Page="RadioButtons" /> | ||
| 166 | </Button> | ||
| 167 | </Page> | ||
| 168 | <Page Name="RadioButtons"> | ||
| 169 | <Label X="6" Y="6" Width="-6" Height="43" FontId="Default"> | ||
| 170 | This page has two groups of radio buttons. Only one value should be able to be selected for each group. A value should be able to be selected for both groups. | ||
| 171 | </Label> | ||
| 172 | <Label X="6" Y="50" Width="-6" Height="13" FontId="Default"> | ||
| 173 | Choice #1: | ||
| 174 | </Label> | ||
| 175 | <RadioButtons Name="CHOICE"> | ||
| 176 | <RadioButton Height="30" Width="30" X="33" Y="68" Value="1" /> | ||
| 177 | <RadioButton Height="30" Width="30" X="33" Y="103" Value="2" /> | ||
| 178 | </RadioButtons> | ||
| 179 | <Label X="6" Y="138" Width="-6" Height="13" FontId="Default"> | ||
| 180 | Choice #2: | ||
| 181 | </Label> | ||
| 182 | <RadioButtons Name="CHOICE2"> | ||
| 183 | <RadioButton Height="30" Width="130" X="33" Y="156" Value="1">One</RadioButton> | ||
| 184 | <RadioButton Height="30" Width="130" X="33" Y="191" Value="2">Two</RadioButton> | ||
| 185 | </RadioButtons> | ||
| 186 | <Button Name="RadioButtonsBackButton" X="-269" Y="-11" Width="75" Height="23" TabStop="yes" FontId="Default"> | ||
| 187 | <Text>Back</Text> | ||
| 188 | <ChangePageAction Page="Billboard" /> | ||
| 189 | </Button> | ||
| 163 | </Page> | 190 | </Page> |
| 164 | <Button Name="StartButton" X="-97" Y="-11" Width="75" Height="23" TabStop="yes" FontId="Default" Visible="yes"> | 191 | <Button Name="StartButton" X="-97" Y="-11" Width="75" Height="23" TabStop="yes" FontId="Default" Visible="yes"> |
| 165 | <Text>Start</Text> | 192 | <Text>Start</Text> |
