Changeset 58b493b in rtems-libbsd


Ignore:
Timestamp:
Oct 30, 2013, 10:56:00 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
c4645e4d
Parents:
79e6125
git-author:
Sebastian Huber <sebastian.huber@…> (10/30/13 10:56:00)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/31/13 12:18:53)
Message:

PING(8): Avoid large buffers on the stack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sbin/ping/ping.c

    r79e6125 r58b493b  
    264264        struct sigaction si_sa;
    265265        size_t sz;
     266#ifndef __rtems__
    266267        u_char *datap, packet[IP_MAXPACKET] __aligned(4);
     268#else /* __rtems__ */
     269        u_char *datap;
     270        static u_char packet[IP_MAXPACKET] __aligned(4);
     271#endif /* __rtems__ */
    267272        char *ep, *source, *target, *payload;
    268273        struct hostent *hp;
     
    276281            tos, ttl;
    277282        char ctrl[CMSG_SPACE(sizeof(struct timeval))];
     283#ifndef __rtems__
    278284        char hnamebuf[MAXHOSTNAMELEN], snamebuf[MAXHOSTNAMELEN];
     285#else /* __rtems__ */
     286        static char hnamebuf[MAXHOSTNAMELEN];
     287        static char snamebuf[MAXHOSTNAMELEN];
     288#endif /* __rtems__ */
    279289#ifdef IP_OPTIONS
    280290        char rspace[MAX_IPOPTLEN];      /* record route space */
Note: See TracChangeset for help on using the changeset viewer.