Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Chris Packham's avatar
    d921ed9a
    lib: net_utils: make string_to_ip stricter · d921ed9a
    Chris Packham authored
    
    Previously values greater than 255 were implicitly truncated. Add some
    stricter checking to reject addresses with components >255.
    
    With the input "1234192.168.1.1" the old behaviour would truncate the
    address to 192.168.1.1. New behaviour rejects the string outright and
    returns 0.0.0.0, which for the purposes of IP addresses can be
    considered an error.
    
    Signed-off-by: default avatarChris Packham <judge.packham@gmail.com>
    d921ed9a
    History
    lib: net_utils: make string_to_ip stricter
    Chris Packham authored
    
    Previously values greater than 255 were implicitly truncated. Add some
    stricter checking to reject addresses with components >255.
    
    With the input "1234192.168.1.1" the old behaviour would truncate the
    address to 192.168.1.1. New behaviour rejects the string outright and
    returns 0.0.0.0, which for the purposes of IP addresses can be
    considered an error.
    
    Signed-off-by: default avatarChris Packham <judge.packham@gmail.com>