Changeset cdf8a300 in rtems


Ignore:
Timestamp:
Jan 28, 1999, 6:42:34 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
379d2ed
Parents:
c9df8d8f
Message:

Patch from Eric Norum <eric@…> to avoid dereferencing a
NULL pointer.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libnetworking/rtems/rtems_syscall.c

    rc9df8d8f rcdf8a300  
    449449        iov.iov_len = buflen;
    450450        msg.msg_name = (caddr_t)from;
    451         msg.msg_namelen = *fromlen;
     451        if (fromlen)
     452                msg.msg_namelen = *fromlen;
     453        else
     454        msg.msg_namelen = 0;
    452455        msg.msg_iov = &iov;
    453456        msg.msg_iovlen = 1;
  • c/src/lib/libnetworking/rtems/rtems_syscall.c

    rc9df8d8f rcdf8a300  
    449449        iov.iov_len = buflen;
    450450        msg.msg_name = (caddr_t)from;
    451         msg.msg_namelen = *fromlen;
     451        if (fromlen)
     452                msg.msg_namelen = *fromlen;
     453        else
     454        msg.msg_namelen = 0;
    452455        msg.msg_iov = &iov;
    453456        msg.msg_iovlen = 1;
  • c/src/libnetworking/rtems/rtems_syscall.c

    rc9df8d8f rcdf8a300  
    449449        iov.iov_len = buflen;
    450450        msg.msg_name = (caddr_t)from;
    451         msg.msg_namelen = *fromlen;
     451        if (fromlen)
     452                msg.msg_namelen = *fromlen;
     453        else
     454        msg.msg_namelen = 0;
    452455        msg.msg_iov = &iov;
    453456        msg.msg_iovlen = 1;
  • cpukit/libnetworking/rtems/rtems_syscall.c

    rc9df8d8f rcdf8a300  
    449449        iov.iov_len = buflen;
    450450        msg.msg_name = (caddr_t)from;
    451         msg.msg_namelen = *fromlen;
     451        if (fromlen)
     452                msg.msg_namelen = *fromlen;
     453        else
     454        msg.msg_namelen = 0;
    452455        msg.msg_iov = &iov;
    453456        msg.msg_iovlen = 1;
Note: See TracChangeset for help on using the changeset viewer.