Some C99 and security/range checking cleanup, plus a new example program#45
Open
michaelrsweet wants to merge 7 commits intoricmoo:masterfrom
Open
Some C99 and security/range checking cleanup, plus a new example program#45michaelrsweet wants to merge 7 commits intoricmoo:masterfrom
michaelrsweet wants to merge 7 commits intoricmoo:masterfrom
Conversation
- The bool type is C99 and defined in stdbool.h. Use it instead of defining a new bool type and constants. - Add VERSION_MIN and VERSION_MAX defines along with a VERSION_AUTO (0) that has qrcode_initXxx calculate the optimal size. - Range check the data length to the version used. - Range check the ecc and version arguments. - Range check the text length instead of passing a 64-bit string length to a uint16_t argument. - In qrcode_getModule, use a right shift from 128 instead of a left shift to avoid the extra arithmetic. - Trim trailing whitespace from lines (this is something my editor did by default).
Author
|
Oh, and apologies for the number of whitespace changes on the blank lines - my editor strips trailing whitespace so there are a lot of changes there that are just whitespace getting deleted... :/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I found your "library" and wanted to contribute a few little changes: