diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-12-18 22:44:16 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2008-12-18 22:44:16 +0100 |
commit | 1a519d0874eb6e6642f16cd134abcfc9b850ee24 (patch) | |
tree | b559ae8e780f14a4375063c24483aa0013d18f7b | |
parent | bb5d7d1ddfb8a580b60ae846de5e8ce201e0016d (diff) |
When unmarshalling, don't error out if there is more data than required.
2008-12-18 Neal H. Walfield <neal@gnu.org>
* viengoos/rpc.h (RPC_SEND_UNMARSHAL): Don't error out if there is
more data than we strictly require.
(RPC_REPLY_UNMARSHAL): Likewise.
-rw-r--r-- | libviengoos/ChangeLog | 6 | ||||
-rw-r--r-- | libviengoos/viengoos/rpc.h | 16 |
2 files changed, 12 insertions, 10 deletions
diff --git a/libviengoos/ChangeLog b/libviengoos/ChangeLog index 7520696..41998b3 100644 --- a/libviengoos/ChangeLog +++ b/libviengoos/ChangeLog @@ -1,5 +1,11 @@ 2008-12-18 Neal H. Walfield <neal@gnu.org> + * viengoos/rpc.h (RPC_SEND_UNMARSHAL): Don't error out if there is + more data than we strictly require. + (RPC_REPLY_UNMARSHAL): Likewise. + +2008-12-18 Neal H. Walfield <neal@gnu.org> + * viengoos/message.h (vg_message_space): New function. 2008-12-18 Neal H. Walfield <neal@gnu.org> diff --git a/libviengoos/viengoos/rpc.h b/libviengoos/viengoos/rpc.h index 7817f54..2225ac8 100644 --- a/libviengoos/viengoos/rpc.h +++ b/libviengoos/viengoos/rpc.h @@ -417,12 +417,10 @@ typedef vg_addr_t cap_t; int __rsu_cap_idx __attribute__ ((unused)) = 1; \ error_t __rsu_err = 0; \ RPCSTORE (icount, ##__VA_ARGS__); \ - if (unlikely (__rsu_err \ - || (__rsu_data_idx * sizeof (uintptr_t) \ - != vg_message_data_count (msg) \ - && __rsu_cap_idx + 1 != vg_message_cap_count (msg)))) \ + /* Note: we do not error out if there are too many arguments. */ \ + if (unlikely (__rsu_err)) \ { \ - debug (1, #id " has wrong number of arguments: " \ + debug (1, #id " has too little data: " \ "got %d bytes and %d caps; expected %d/%d", \ __rsu_data_idx * sizeof (uintptr_t), __rsu_cap_idx + 1, \ vg_message_data_count (msg), \ @@ -493,12 +491,10 @@ typedef vg_addr_t cap_t; int __rsu_data_idx __attribute__ ((unused)) = 1; \ int __rsu_cap_idx __attribute__ ((unused)) = 0; \ RPCSTORE (CPP_ADD (out_count, ret_cap_count), ##__VA_ARGS__); \ - if (unlikely (__rsu_err \ - || (__rsu_data_idx * sizeof (uintptr_t) \ - != vg_message_data_count (msg) \ - || __rsu_cap_idx != vg_message_cap_count (msg)))) \ + /* Note: we do not error out if there are too many arguments. */ \ + if (unlikely (__rsu_err)) \ { \ - debug (1, #id " has wrong number of arguments: " \ + debug (1, #id " has too little data: " \ "got %d bytes and %d caps; expected %d/%d", \ __rsu_data_idx * sizeof (uintptr_t), __rsu_cap_idx, \ vg_message_data_count (msg), \ |