[Aptitude-devel] Stepping down as maintainer/developer
Jens Seidel
jensseidel at users.sf.net
Fri Mar 2 14:26:38 UTC 2012
Am 28. Februar 2012 11:58 schrieb Manuel A. Fernandez Montecelo
<manuel.montezelo at gmail.com>:
> So what's technically wrong with this one:
> http://anonscm.debian.org/gitweb/?p=aptitude/aptitude.git;a=commitdiff;h=c6e2914b0c751d591ad3e39743c7d417e7f6aaef
+ return theme_config->FindVector((themeroot+Name).c_str());
themeroot+Name is a temporary string which gets soon destroyed whereas
the pointer to it is passed to FindVector.
> That you changed to:
> http://anonscm.debian.org/gitweb/?p=aptitude/aptitude.git;a=commitdiff;h=69deef1f4a9678a67a547b5dd8c35f6303832ce0
+ return theme_config->FindVector(themeroot+Name);
+ inline std::vector<string> FindVector(string Name)
Here the temporary string is handled via call by value which makes a copy of it.
This is save.
But I agree that this fix is not described in the commit log so maybe
it was not noticed (or I'm wrong :-))
Jens
More information about the Aptitude-devel
mailing list