Changeset 1aeb727 in rtems-libbsd


Ignore:
Timestamp:
Oct 23, 2018, 5:37:11 AM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
647dd08ae2aa69b935c2847ea450fb824322ecae, c6261f97870562d4c797cfb1ff1ba0affb85a916
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.