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 /libviengoos/viengoos/rpc.h | |
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.
Diffstat (limited to 'libviengoos/viengoos/rpc.h')
-rw-r--r-- | libviengoos/viengoos/rpc.h | 16 |
1 files changed, 6 insertions, 10 deletions
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), \ |