[pacman-dev] [PATCH] Add check for NULL data parameter in sync commit

Allan McRae mcrae_allan at hotmail.com
Sat Dec 22 11:03:41 EST 2007


Nagy Gabor wrote:
> Indeed, this bug still exists. But I interpret your patch as a
> workaround (or hotfix), right? I mean we should fix alpm_sync_commit to
> work with NULL **data (which means we don't need additional error info)
>
> Bye
Yeah, it was really a hotfix. I hadn't thought about people wanting to 
ignore the error messages.  Here is what alpm_trans_commit calls:

alpm_trans_commit
  -> _alpm_trans_commit
    -> _alpm_sync_commit
      -> test_delta_md5sum & test_pkg_md5sum
        -> test_md5sum
      -> _alpm_trans_prepare
        -> _alpm_sync_prepare
          -> _alpm_resolvedeps


The only places I can find writing to data are without a if(data) block are:
_alpm_trans_prepare
_alpm_sync_prepare
test_md5sum

The attached patch fixes those and thus should fixed the problem at its 
source.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-NULL-parameter-in-alpm_trans_commit.patch
Type: text/x-patch
Size: 2376 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20071223/959e6c26/attachment.bin>


More information about the pacman-dev mailing list