Return new UC_ERR_OVERFLOW instead of UC_ERR_NOMEM when reg buffer is too small
This commit is contained in:
@@ -131,7 +131,7 @@ static inline void uc_common_init(struct uc_struct* uc)
|
||||
|
||||
#define CHECK_REG_TYPE(type) do { \
|
||||
if (unlikely(*size < sizeof(type))) { \
|
||||
return UC_ERR_NOMEM; \
|
||||
return UC_ERR_OVERFLOW; \
|
||||
} \
|
||||
*size = sizeof(type); \
|
||||
ret = UC_ERR_OK; \
|
||||
|
||||
Reference in New Issue
Block a user