Skip to content
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

Merged
merged 1 commit into from May 17, 2021

Conversation

chibataiki
Copy link
Contributor

@chibataiki chibataiki commented May 13, 2021

try fix null pointer deference for issue #36

@rockcarry
Copy link
Owner

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;
Copy link
Owner

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.

Copy link
Contributor Author

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;
Copy link
Owner

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.

@rockcarry
Copy link
Owner

can you check and address my comments on your patch ?

@chibataiki
Copy link
Contributor Author

can you check and address my comments on your patch

chiba :: ~/ffjpeg-check ‹master*› » make
src
make -C src
make[1]: Entering directory '/home/chiba/ffjpeg-check/src'
gcc -Wall -o bitstr.o bitstr.c -c
ar rcs libffjpeg.a color.o dct.o quant.o zigzag.o bitstr.o huffman.o bmp.o jfif.o
gcc -Wall -o ffjpeg ffjpeg.o libffjpeg.a
make[1]: Leaving directory '/home/chiba/ffjpeg-check/src'

@rockcarry rockcarry merged commit 863adf2 into rockcarry:master May 17, 2021
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.

None yet

2 participants