Skip to content
  • Marvin Scholz's avatar
    darwin: rewrite mount_get_mountpoint · 406a4302
    Marvin Scholz authored and Petri Hintukainen's avatar Petri Hintukainen committed
    Rewrite most of mount_get_mountpoint for Darwin using the
    DiskArbitration API instead of the more low level getfsstat.
    
    This fixes a memory over-read leading to a crash when the system
    has more than 128 mounts.
    
    Additionally it changes the logic a bit, now it is first checked
    if the path exists and is a folder, if that is not the case, try
    to interpret it as BSD mount name, this makes BSD names like 'disk2'
    work (provided there is no folder/image with that name) as expected.
    
    Reported by Collin Allen.
    
    Fix #21
    406a4302
Loading