[pacman-dev] New pacman testing RC
Aaron Griffin
aaronmgriffin at gmail.com
Mon Jan 22 19:53:58 EST 2007
On 1/22/07, Jürgen Hötzel <juergen at hoetzel.info> wrote:
> You removed the "empty list assertion" in alpm_list_getdata, which prevented
> the dereference of NULL pointers?
>
> void *alpm_list_getdata(const pmlist_t *entry)
> {
> ASSERT(entry != NULL, return(NULL));
> return(entry->data);
> }
Hmmm, looks like I did. However, at the same time, I would never
expect "assert" to actually do something like return. I'm going to
just add in a normal check, that macro seems a bit silly to me.
Regardless, _getdata shouldn't be called with a null list entry, so
the fact that the list node is null is probably the root of the
problem.
More information about the pacman-dev
mailing list