-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Format string causes undefined behavior #7
Comments
Thanks, I'll take a look. 👍 |
I found a bug, the keys generated by Github Actions are all invalid. 😥 I can't find the reason, is it because of the cloud windows coding problem? If you have a spare time, can you help to check it out? |
I find that: The key generated in this way is valid:
but the key generated in this way is invalid:
|
Ohh. It's because powershell is outputting in UTF16-LE format by default, which is causing the error. I fixed. Format string issues was also fixed using your suggestion. Thanks again! 😄 |
The format string "60%060s%060s" at:
winrar-keygen/WinRarKeygen.hpp
Line 214 in fbc4fb2
and
winrar-keygen/WinRarKeygen.hpp
Line 242 in fbc4fb2
is not valid, the "0" flag cannot be combined with the "s" specifier.
The string should be replaced with
"60%s%s"
like this:winrar-keygen/WinRarKeygen.hpp
Line 214 in fbc4fb2
should be replaced by:
and
winrar-keygen/WinRarKeygen.hpp
Line 242 in fbc4fb2
should be replaced by:
The changes introduced in #6 already ensure the strings to be formatted are exactly 60 chars.
The text was updated successfully, but these errors were encountered: