Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential read access violation with an addon path setting #18414

Merged
merged 1 commit into from Sep 15, 2020

Conversation

anxdpanic
Copy link
Member

Description

This fixes a potential read access violation when an add-on path setting source is empty.

Motivation and Context

Converted settings to new format and ran into this reproducible crash.
Settings similar to below would cause Kodi to crash on access, due to the empty <source/>

<?xml version="1.0" ?>
<settings version="1">
    <category help="" id="export" label="30001">
        <group id="1">
            <setting help="" id="export_path" label="30001" type="path">
                <level>0</level>
                <default/>
                <constraints>
                    <sources>
                        <source/>
                    </sources>
                    <allowempty>true</allowempty>
                </constraints>
                <control format="path" type="button">
                    <heading>30001</heading>
                </control>
            </setting>
        </group>
    </category>
</settings>

How Has This Been Tested?

Runtime, no longer crashes

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@anxdpanic anxdpanic added Component: Settings Type: Fix non-breaking change which fixes an issue v19 Matrix labels Sep 12, 2020
@phunkyfish phunkyfish added this to the Matrix 19.0-alpha 2 milestone Sep 12, 2020
Copy link
Member

@AlwinEsch AlwinEsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix!

@phunkyfish
Copy link
Contributor

Your button @anxdpanic!

@anxdpanic anxdpanic merged commit 692981e into xbmc:master Sep 15, 2020
@anxdpanic anxdpanic deleted the settings_crash branch September 15, 2020 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Settings Type: Fix non-breaking change which fixes an issue v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants