2015-12-02 16:37 GMT+01:00 Raphael Geissert <[email protected]>:
> Source: packagekit
> Version: 1.0.1-2
> Tags: patch upstream
>
> Hi,
>
> Whenever the proxy configuration can not be found in the PackageKit.db
> the proxy variables of PkBackendJob are left uninitialized. Moreover,
> aptcc's AptIntf::init comes later down on the line and unconditionally
> sets http_proxy and ftp_proxy, therefore setting them to whatever the
> string processing functions get to read from memory.
>
> The latter seems to have been fixed in 1.0.11, but from a quick look
> it appears that the former bug is still present.
While your patch definitely fixes an issue (that function should
return TRUE if we don't have proxy data), I wonder why your patch
fixes the data corruption.
PkBackendJob is a GObject class, and all pointers defined in their
private struct are by default initialized to NULL. So, the proxy
variables should already be NULL, and applying your patch shouldn't
actually fix this issue, unless there is a compiler bug.
Can you maybe check if the PkBackendJob prxy variables are really not
initialized to NULL by default? If so, I wonder why, since if the
mechanism would in general be broken, we would see a lot more errors,
since many classes in PK assume this behavior (and actually, all libs
using GObject do, in one way or another).
Cheers,
Matthias