[rtems commit] rpc: misaligned pointer dereference in clnt_udp.c line 363
Gedare Bloom
gedare at rtems.org
Mon Feb 23 17:28:45 UTC 2015
Module: rtems
Branch: master
Commit: ced84fc0ea30d33674f56bbb174b85fc662b3f75
Changeset: http://git.rtems.org/rtems/commit/?id=ced84fc0ea30d33674f56bbb174b85fc662b3f75
Author: Jeffrey Hill <johill at lanl.gov>
Date: Mon Feb 23 12:27:05 2015 -0500
rpc: misaligned pointer dereference in clnt_udp.c line 363
closes #2248
---
cpukit/librpc/src/rpc/clnt_udp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpukit/librpc/src/rpc/clnt_udp.c b/cpukit/librpc/src/rpc/clnt_udp.c
index 369da95..68e085e 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;
More information about the vc
mailing list