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

hash: fix missing error return on production builds by pks-t · Pull Request #5145 · libgit2/libgit2 · GitHub

hash: fix missing error return on production builds - #5145

Merged
pks-t merged 1 commit into
libgit2:masterfrom
pks-t:pks/hash-algo-uninit-return
Jun 27, 2019
Merged

hash: fix missing error return on production builds#5145
pks-t merged 1 commit into
libgit2:masterfrom
pks-t:pks/hash-algo-uninit-return

Conversation

pks-t commented Jun 27, 2019

Copy link
Copy Markdown
Member

When no hash algorithm has been initialized in a given hash context,
then we will simply assert and not return a value at all. This works
just fine in debug builds, but on non-debug builds the assert will be
converted to a no-op and thus we do not have a proper return value.

Fix this by returning an error code in addition to the asserts.

When no hash algorithm has been initialized in a given hash context,
then we will simply `assert` and not return a value at all. This works
just fine in debug builds, but on non-debug builds the assert will be
converted to a no-op and thus we do not have a proper return value.

Fix this by returning an error code in addition to the asserts.
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.

1 participant


Back | FazBrowse Home | New Git URL