-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redo SPL send implementation following spec update #109
base: fbe/sol_token_swap
Are you sure you want to change the base?
Conversation
8378f4d
to
9b36f57
Compare
C tests are broken because there is no mock feature |
bf9a872
to
26bbe8b
Compare
26bbe8b
to
ba3d749
Compare
trusted_name_info->struct_version = value; | ||
return true; | ||
static void trusted_info_reset(trusted_info_t *trusted_info) { | ||
explicit_bzero(trusted_info, sizeof(trusted_info)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be sizeof(*trusted_info)
sig_ctx->input_sig_size)); | ||
// Save the encoded address | ||
memset(out_encoded_address, 0, BASE58_PUBKEY_LENGTH); | ||
memcpy(out_encoded_address, in_encoded_address.ptr, in_encoded_address.size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Behavior is undefined if memcpy src or dst is NULL even when size is 0. In practice not sure it can happens because messages are signed and thus cannot be manipulated by an attacker.
Still better not to call memcpy with a null pointer y adding a precondition or setting it to a pointer even if size is 0 during parsing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C tests are broken because there is no mock feature
To fix later, too big to implement
Also this architecture split between libsol and src should be thought over
Yeah, I think the fuzzer might be broken too
No description provided.