Skip to content

Improve sanity checks of user input#44

Merged
dloebl merged 4 commits into
mainfrom
better-sanity-checks
Feb 25, 2022
Merged

Improve sanity checks of user input#44
dloebl merged 4 commits into
mainfrom
better-sanity-checks

Conversation

@dloebl

@dloebl dloebl commented Feb 23, 2022

Copy link
Copy Markdown
Owner

Improved checking of user input in cgif for correctness. This includes:

  • Check whether the color table(s) provided by the user have no more than 256 entries.
  • Check if the user provided a color table at all (global or local).
  • Bounds-check when looking up colors in the color table.

@dloebl dloebl requested a review from MCLoebl February 23, 2022 17:18

@MCLoebl MCLoebl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the overall speed is not affected significantly by this change which is good.

@dloebl dloebl merged commit c4241e2 into main Feb 25, 2022
@dloebl dloebl deleted the better-sanity-checks branch March 2, 2022 16:38
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

Successfully merging this pull request may close these issues.

2 participants