Skip to content

fixed: prevent infinite loop in add-on dependency checks #2475

Merged
merged 1 commit into from Mar 21, 2013

5 participants

@ghost
ghost commented Mar 20, 2013

recently, we had a crash caused by two add-ons depending on each other.

@Memphiz
Team Kodi member
Memphiz commented Mar 20, 2013

looks solid

@MartijnKaijser
Team Kodi member

confirmed fixed on win32

@ulion ulion and 1 other commented on an outdated diff Mar 21, 2013
xbmc/addons/AddonInstaller.cpp
@@ -311,7 +313,8 @@ void CAddonInstaller::InstallFromXBMCRepo(const set<CStdString> &addonIDs)
Install(*i);
}
-bool CAddonInstaller::CheckDependencies(const AddonPtr &addon)
+bool CAddonInstaller::CheckDependencies(const AddonPtr &addon,
+ std::vector<std::string>& preDeps)
@ulion
ulion added a note Mar 21, 2013

how about add an overloaded method CheckDependencies(const AddonPtr &addon) to save other 3 places changes?

@akva2
akva2 added a note Mar 21, 2013

not sure it saves many lines but sure i can do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@akva2
akva2 commented Mar 21, 2013

redone.

@ulion
ulion commented Mar 21, 2013

looks clean.

@MartijnKaijser MartijnKaijser merged commit b0825b1 into xbmc:master Mar 21, 2013
@Voyager1 Voyager1 commented on the diff Mar 23, 2013
xbmc/addons/AddonInstaller.cpp
return false;
+ }
+ preDeps.push_back(dep->ID());
@Voyager1
Team Kodi member
Voyager1 added a note Mar 23, 2013

I've come across a case where dep == NULL causing crash. Probably this call needs to be guarded by if (dep)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.