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
try fix null pointer deference for issue #36 #37
Conversation
|
I reviewed your patch, it's good. I'll merge it later. |
| @@ -184,6 +184,7 @@ void* bitstr_open(void *fnamebuf, char *fmode, int bufsize) | |||
|
|
|||
| int bitstr_close(void *stream) | |||
| { | |||
| if (!stream) return EOF; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you get compile warning ?
because C language should define variable at the head of fucntion implemention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't get warning, actually the variable is already declaration and definition at the beginning.
| if (!stream) return EOF; | ||
| int type = *(int*)stream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same question as above.
|
can you check and address my comments on your patch ? |
|
try fix null pointer deference for issue #36