http://macfuse.googlecode.com/svn/trunk/filesystems/hello/hello_ll.c

static void dirbuf_add(fuse_req_t req, struct dirbuf *b, const char
*name,
                       fuse_ino_t ino)
{
...
        b->p = (char *) realloc(b->p, b->size);

when realloc fails, it returns null and leaves the in pointer
unchanged.

the code above leaks the original value when this happens, and loses
the data, leaving a null pointer

        fuse_add_direntry(req, b->p + oldsize, b->size - oldsize, name,
&stbuf,
                          b->size);

this now passes a non null value to the fuse api, if you're really
unlucky, this is probably scary.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to