Changeset 1aeb727 in rtems-libbsd


Ignore:
Timestamp:
Oct 23, 2018, 5:37:11 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
b96abfd647154f10ea8f7fac68e25676636eded5, 9dd0bc27e3338bad08eaaf52d03265d2e7b9b4f7, f1f03620800b14146977d78fb4322d80da04b53a, 90a9fd66e0a85d8520bbb4bbcb72bfd274965961
Children:
dbb2407
Parents:
b151e8a
Message:

pppd: Fix use of uninitialized stack variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/pppd/sys-rtems.c

    rb151e8a r1aeb727  
    881881    struct ifreq ifr;
    882882
     883    BZERO(&ifra, sizeof(ifra));
    883884    strlcpy(ifra.ifra_name, ifname, sizeof(ifra.ifra_name));
    884885    SET_SA_FAMILY(ifra.ifra_addr, AF_INET);
     
    889890        SET_SA_FAMILY(ifra.ifra_mask, AF_INET);
    890891        ((struct sockaddr_in *) &ifra.ifra_mask)->sin_addr.s_addr = m;
    891     } else
    892         BZERO(&ifra.ifra_mask, sizeof(ifra.ifra_mask));
     892    }
    893893    BZERO(&ifr, sizeof(ifr));
    894894    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
     
    921921
    922922    ifaddrs[0] = 0;
     923    BZERO(&ifra, sizeof(ifra));
    923924    strlcpy(ifra.ifra_name, ifname, sizeof(ifra.ifra_name));
    924925    SET_SA_FAMILY(ifra.ifra_addr, AF_INET);
     
    926927    SET_SA_FAMILY(ifra.ifra_broadaddr, AF_INET);
    927928    ((struct sockaddr_in *) &ifra.ifra_broadaddr)->sin_addr.s_addr = h;
    928     BZERO(&ifra.ifra_mask, sizeof(ifra.ifra_mask));
    929929    if (ioctl(sockfd, SIOCDIFADDR, (caddr_t) &ifra) < 0) {
    930930        if (errno != EADDRNOTAVAIL)
Note: See TracChangeset for help on using the changeset viewer.