summaryrefslogtreecommitdiffstats
path: root/c/src/exec/libnetworking/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-01-28 18:42:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-01-28 18:42:34 +0000
commitcdf8a300923e445996811c78d19cbd2f5c3997ab (patch)
tree87976ecc34eb1bd368344ae25fc3149bb7cfcadd /c/src/exec/libnetworking/rtems
parentPatch from Eric Norum <eric@skatter.usask.ca> to set more flags in (diff)
downloadrtems-cdf8a300923e445996811c78d19cbd2f5c3997ab.tar.bz2
Patch from Eric Norum <eric@skatter.usask.ca> to avoid dereferencing a
NULL pointer.
Diffstat (limited to 'c/src/exec/libnetworking/rtems')
-rw-r--r--c/src/exec/libnetworking/rtems/rtems_syscall.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/c/src/exec/libnetworking/rtems/rtems_syscall.c b/c/src/exec/libnetworking/rtems/rtems_syscall.c
index 63d34bd817..4a871f78fb 100644
--- a/c/src/exec/libnetworking/rtems/rtems_syscall.c
+++ b/c/src/exec/libnetworking/rtems/rtems_syscall.c
@@ -448,7 +448,10 @@ recvfrom (int s, void *buf, size_t buflen, int flags, const struct sockaddr *fro
iov.iov_base = buf;
iov.iov_len = buflen;
msg.msg_name = (caddr_t)from;
- msg.msg_namelen = *fromlen;
+ if (fromlen)
+ msg.msg_namelen = *fromlen;
+ else
+ msg.msg_namelen = 0;
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_control = NULL;