summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Hill <johill@lanl.gov>2015-02-23 12:27:05 -0500
committerGedare Bloom <gedare@rtems.org>2015-02-23 12:28:32 -0500
commitced84fc0ea30d33674f56bbb174b85fc662b3f75 (patch)
tree6d137ab4146ed618e436149ee21087f891459fcb
parent49ff36b8d76ad73ee7007ecdf86f355b610ce2b0 (diff)
downloadrtems-ced84fc0ea30d33674f56bbb174b85fc662b3f75.tar.bz2
rpc: misaligned pointer dereference in clnt_udp.c line 363
closes #2248
-rw-r--r--cpukit/librpc/src/rpc/clnt_udp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/librpc/src/rpc/clnt_udp.c b/cpukit/librpc/src/rpc/clnt_udp.c
index 369da95f2d..68e085ea11 100644
--- a/cpukit/librpc/src/rpc/clnt_udp.c
+++ b/cpukit/librpc/src/rpc/clnt_udp.c
@@ -89,13 +89,13 @@ struct cu_data {
u_int cu_xdrpos;
u_int cu_sendsz; /* send size */
union {
- u_int32_t *i32;
+ u_int32_t *pi32;
char *c;
} _cu_outbuf;
#define cu_outbuf _cu_outbuf.c
u_int cu_recvsz; /* recv size */
union {
- u_int32_t *i32;
+ u_int32_t i32;
char c[1];
} _cu_inbuf;
#define cu_inbuf _cu_inbuf.c
@@ -360,7 +360,7 @@ send_again:
if (inlen < sizeof(u_int32_t))
continue;
/* see if reply transaction id matches sent id */
- if (*(cu->_cu_inbuf.i32) != *(cu->_cu_outbuf.i32))
+ if ( cu->_cu_inbuf.i32 != *cu->_cu_outbuf.pi32 )
continue;
/* we now assume we have the proper reply */
break;