[vlc-devel] [PATCH] Udev SD: Try to find out the mount point for blu-ray discs.

Rémi Denis-Courmont remi at remlab.net
Wed Feb 15 16:39:02 CET 2012


On Wed, 15 Feb 2012 19:37:56 +0400, Konstantin Pavlov
<thresh at videolan.org>
wrote:
>> > +        struct mntent* m;
>> > +        struct mntent mbuf;
>> > +        char buf [8192];
>> > +        while ((m = getmntent_r (mtab, &mbuf, buf, sizeof(buf))) !=
>> NULL)
>> > +        {
>> > +            if( !strcmp (m->mnt_fsname, val)) val = m->mnt_dir;
>> > +        }
>> > +        endmntent (mtab);
>> > +    }
>> > +
>> >      return make_URI (val, scheme);
>> 
>> This looks like use-after-release to me.
> 
> Uhm, why?

val = m->mnt_dir... I don't suppose the storage for that is still valid.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list