Fail if we try to call past the end of the table

This commit is contained in:
Jef
2019-01-18 14:01:12 +01:00
parent b6e29a899e
commit c7956dbdb2
2 changed files with 8 additions and 1 deletions

View File

@@ -297,6 +297,10 @@ impl VmCtx {
pub fn offset_of_funcs_ptr() -> usize {
offset_of!(Self, table.ptr)
}
pub fn offset_of_funcs_len() -> usize {
offset_of!(Self, table.ptr)
}
}
impl<T> Drop for BoxSlice<T> {