Skip to content
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

memcpy a pass by value variable in enc_text_decrypt(enc_text.cpp) #6

Open
ScottLiao920 opened this issue Feb 15, 2022 · 1 comment
Open

Comments

@ScottLiao920
Copy link

in line 410-411 of enc_text.cpp, it means to update dst_len with the actual length of decrypted string, but as dst_len is passed by value, this update will not affect dst_len on the caller side.
Is it designed to perform as this?

@55199789
Copy link

The exact value of dst_len will not be updated (on the caller side), but it updates pDst[dst_len] = '\0'; (line 421), then the caller can determine the actual length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants