On Thu, Aug 7, 2008 at 5:36 PM, Dan McGee <[EMAIL PROTECTED]> wrote:
>
> OK, you've found a much better test case here, thanks. This points us
> to line 302, the NULL set below:
>
>  if(data) {
>    *data = NULL;
>  }
>
> This check doesn't seem quite right- shouldn't we be checking *data
> for existance before we go setting things? Something like:
>
> if(data && *data) {
>  *data = NULL;
> }
>
> Or what do we do here? Double pointers start confusing me. :)
>

We already have this kind of code everywhere in libalpm. It does not
cause any problems when it is used correctly.
And I don't know how to make it safer either.
How can we know if data is actually a valid address, and so if we can
access *data or not.
_______________________________________________
pacman-dev mailing list
[email protected]
http://archlinux.org/mailman/listinfo/pacman-dev

Reply via email to