• Dave Reisner's avatar
    dload: never return NULL from get_filename · 0c4a8ae2
    Dave Reisner authored and Allan McRae's avatar Allan McRae committed
    Downloads with a Content-Disposition header will typically not include
    slashes. When they do, we should most certainly only take the basename,
    but when they don't, we should treat the header value as the filename.
    
    Crash introduced in d197d8ab
    
     when we started using get_filename
    in order to rightfully avoid an arbitrary file overwrite vulnerability.
    
    Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
    0c4a8ae2