Skip to content
  • nikolay@redhat.com's avatar
    bonding: fix second off-by-one error · c84e1590
    nikolay@redhat.com authored
    
    
    Fix off-by-one error because IFNAMSIZ == 16 and when this
    code gets executed we stick a NULL byte where we should not.
    
    How to reproduce:
     with CONFIG_CC_STACKPROTECTOR=y (otherwise it may pass by silently)
     modprobe bonding; echo 1 > /sys/class/net/bond0/bonding/mode;
     echo "AAAAAAAAAAAAAAAA" > /sys/class/net/bond0/bonding/active_slave;
    
    Signed-off-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
    
    Note: Sorry for the second patch but I missed this one while checking
          the file. You can squash them into one patch.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c84e1590