[Rpm-maint] [rpm-software-management/rpm] make sure not to dereference NULL pointer (#106)

proyvind notifications at github.com
Wed Dec 7 01:56:51 UTC 2016


This bug made me really puzzled and I don't wanna dig further around to
try wrap my head around to confirm that this fix is actually the right
one, nor if I even understand the problem or not.

I encountered it repeatedly right away, when installing a mageia
installation from rpm5 based omv-cooker into chroot.

I've not really tried installing a fresh rpm.org environment into a
chroot using rpm.org, but I'd imagine some differences in headers,
triggers what I found even more puzzling even more sloppy coding that
made me extremely uncertain and confused..

rpmtdType() may return -1, which means that rpmtdGetChar() may return
NULL, which as it's possible for this to actually happen, we need to
handle it gracefully without trying to derereference a NULL pointer
uncoditionally..

I was extremely confused about how noone else had encountered this right
away, which I did, but that would explain things using reasoning
without confirming. Internals of rpm.org are wastly different from what
used to with rpm5.org...
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/106

-- Commit Summary --

  * make sure not to dereference NULL pointer

-- File Changes --

    M lib/transaction.c (3)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/106.patch
https://github.com/rpm-software-management/rpm/pull/106.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/106
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20161206/10ed4a89/attachment-0001.html>


More information about the Rpm-maint mailing list