-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoiding null pointer dereference #1096
Conversation
[tk: fixed C90 compliance and tweaked error messages]
@jonas, I started to review this PR from @binho1991 and have some suggestions, see koutcher@gh-1096-null-pointer-deref. |
there are many other places where allocation can fail. Shouldn't we just use xmalloc/xcalloc like git does? |
[tk: fixed C90 compliance and tweaked error messages]
[tk: fixed C90 compliance and tweaked error messages]
[tk: fixed C90 compliance and tweaked error messages]
@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. |
@koutcher thanks for the feedback. |
[tk: fixed C90 compliance and tweaked error messages]
This pull request aims to fix null pointer dereference.
Null pointer dereference