This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFC] patch to fix finding sources


"Martin M. Hunt" wrote:
> 
> when you call full_lookup_symtab() you get a pointer to a symtab struct.
> If that pointer is NULL, it is probably an error.  If the pointer is not
> null, st->fullname will be null if there if the sources are not found.
> So, your code needs changed around a bit to avoid dereferencing a null
> pointer.
> 
> The real problem here is probably my comment on full_lookup_symtab() that
> says it always sets symtab->filename.  Maybe we need a note that it will
> be set to null is the sources are not available.
> 

Yes, I fell for that one:

                                         This version */
   /* also always makes sure symtab->fullname is set. */

Now looking at the code I see that it is not always true.

Please, by all means, send a patch to fix the comment.


Now that I know that I will rewrite the patch.

Thanks for the detailed explanation.

Regards,
Fernando

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]