diff --git a/linux/libdriver/base/abi.c b/linux/libdriver/base/abi.c index 78bd1d20..5d919b46 100644 --- a/linux/libdriver/base/abi.c +++ b/linux/libdriver/base/abi.c @@ -1,4 +1,3 @@ -#include #include #include #include "abi.h" @@ -144,7 +143,8 @@ int evm_abi_put_bytes_d(evm_buf_t *me, evm_buf_t *offset, size_t n, const void * uint32_t evm_abi_peek_funsel(evm_buf_t *me) { - assert(evm_buf_length(me) >= 4); + if (evm_buf_length(me) < 4) + return 0; return EVM_ABI_FUNSEL(me->p[0], me->p[1], me->p[2], me->p[3]); }