Avoiding null pointer dereference#1096
Merged
koutcher merged 2 commits intojonas:masterfrom Jan 4, 2022
Merged
Conversation
koutcher
pushed a commit
to koutcher/tig
that referenced
this pull request
Sep 25, 2021
[tk: fixed C90 compliance and tweaked error messages]
Collaborator
|
@jonas, I started to review this PR from @binho1991 and have some suggestions, see koutcher@gh-1096-null-pointer-deref. |
Contributor
|
there are many other places where allocation can fail. Shouldn't we just use xmalloc/xcalloc like git does? |
Contributor
Author
koutcher
pushed a commit
to koutcher/tig
that referenced
this pull request
Dec 11, 2021
[tk: fixed C90 compliance and tweaked error messages]
koutcher
pushed a commit
to koutcher/tig
that referenced
this pull request
Dec 11, 2021
[tk: fixed C90 compliance and tweaked error messages]
koutcher
pushed a commit
to koutcher/tig
that referenced
this pull request
Dec 12, 2021
[tk: fixed C90 compliance and tweaked error messages]
Collaborator
|
@binho1991, thank you, I don't think xmalloc/xcalloc would bring any benefit. You did a pretty good job at identifying the missing checks, only a few remained in argv_append. I completed my review in koutcher@4958efe (see src/argv.c and src/util.c), I believe it should be enough. |
Contributor
Author
|
@koutcher thanks for the feedback. |
[tk: fixed C90 compliance and tweaked error messages]
vxsl
pushed a commit
to vxsl/tig
that referenced
this pull request
Mar 18, 2026
[tk: fixed C90 compliance and tweaked error messages]
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.
This pull request aims to fix null pointer dereference.
Null pointer dereference