Comment 6 for bug 334104

Revision history for this message
Charles Kerr (charlesk) wrote :

I'm not exactly sure *how* it happened -- I think that part may be fixed in newer releases --
but looking at the stack trace, it's clearly a crash being caused by dereferencing a null
pointer:

> #0 notifyCallback (n=<value optimized out>, action=<value optimized out>,
> gdata=<value optimized out>) at notify.c:54
> tor = (tr_torrent *) 0x0
> info = (const tr_info *) 0x0

and, a few lines later, we have this:

> char * path = g_build_filename( dir, info->files[0].name, NULL );

We can prevent the crash by adding some NULL safeguards.