FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Vector reverse overflow by pks-t · Pull Request #4105 · libgit2/libgit2 · GitHub

Repository navigation

Vector reverse overflow - #4105

Merged
ethomson merged 2 commits into
libgit2:masterfrom
pks-t:pks/vector-reverse-overflow
Feb 2, 2017
Merged

ethomson merged 2 commits into
libgit2:masterfrom
pks-t:pks/vector-reverse-overflow

Conversation

pks-t commented Feb 2, 2017

Copy link
Copy Markdown
Member

This fixes PR #4102

adamniedzielski and others added 2 commits February 2, 2017 16:01
The code reversing a vector initially determines the rear-pointer by
simply subtracting 1 from the vector's length. Obviously, this fails if
the vector is empty, in which case we have an integer overflow.

Fix the issue by returning early if the vector is empty.
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL