Commit 74ac5414 authored by Jonathan Jenkins's avatar Jonathan Jenkins

more sanity checks to callback offsets

parent dc1f19dd
......@@ -73,6 +73,10 @@ struct codes_cb_params {
do { \
int _total_size = sizeof(_ret_type) + sizeof(int) + sizeof(msg_header);\
int _esize = (_cb_info_ptr)->event_size; \
assert(_esize > 0 && \
(_cb_info_ptr)->header_offset >= 0 && \
(_cb_info_ptr)->tag_offset >= 0 && \
(_cb_info_ptr)->cb_ret_offset >= 0); \
assert(_esize >= _total_size); \
assert(_esize >= (_cb_info_ptr)->header_offset + sizeof(msg_header)); \
assert(_esize >= (_cb_info_ptr)->tag_offset + sizeof(int)); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment