• Dridi Boukelmoune's avatar
    std.ip: Always provide some form of fallback · 3dd4d72d
    Dridi Boukelmoune authored
    Otherwise valid code can panic on workspace exhaustion:
    
        std.ip(req.http.X-Real-IP, std.ip(req.http.X-Client-IP, client.ip))
    
    If the nested std.ip() call runs out of workspace, it will return a null
    ip instead of the fallback, and since the outer std.ip() call is getting
    a fallback argument, it will panic upon checking the suckaddr sanity.
    
    Refs a3b26d0b
    3dd4d72d
vmod_std_conversions.c 8.41 KB