Closed technotip closed 1 year ago
hook_account API not returning the error code -1, which corresponds to OUT_OF_BOUNDS.
{ uint8_t hook_acc_id[20]; int64_t result = hook_account(hook_acc_id, 999999999); // 2nd parameter is invalid. trace_num(SBUF("Testcase: no of bytes written "), result); if(result != 20) rollback(SBUF("Testcase2: Couldn't fetch the hook account."), 1); trace(SBUF("Testcase2: hook_acc_id "), SBUF(hook_acc_id), 1); }
Above code is expected to return error code -1, which corresponds to OUT_OF_BOUNDS.
It's returning the code 20, indicating that its writing 20 bytes of data to buffer referenced by hook_acc_id.
This is fixed on latest
Issue Description
hook_account API not returning the error code -1, which corresponds to OUT_OF_BOUNDS.
Steps to Reproduce
Expected Result
Above code is expected to return error code -1, which corresponds to OUT_OF_BOUNDS.
Actual Result
It's returning the code 20, indicating that its writing 20 bytes of data to buffer referenced by hook_acc_id.