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

Revised PNG_CLEANUP to avoid destroying already-destroyed structs #784

Closed
wants to merge 24 commits into from
Closed

Revised PNG_CLEANUP to avoid destroying already-destroyed structs #784

wants to merge 24 commits into from

Conversation

glennrp
Copy link
Contributor

@glennrp glennrp commented Aug 21, 2017

No description provided.

@glennrp
Copy link
Contributor Author

glennrp commented Aug 21, 2017

Recent crashes may be due to over-zealous CLEANUP. This patch avoids destroying png structs that have already been destroyed.

@oliverchang
Copy link
Collaborator

Thanks for this change!

Is there any chance that this fuzzer file could be included in the upstream libpng repository?

@glennrp
Copy link
Contributor Author

glennrp commented Aug 21, 2017 via email

@oliverchang
Copy link
Collaborator

oliverchang commented Aug 21, 2017

Yep! We checkout libpng during build, so we can just point our build script to the upstream file instead.

Ideally, libpng would also provide build system support (see https://github.com/google/oss-fuzz/blob/master/docs/ideal_integration.md#build-support), but that can come later :)

@glennrp
Copy link
Contributor Author

glennrp commented Aug 22, 2017 via email

@glennrp
Copy link
Contributor Author

glennrp commented Aug 22, 2017 via email

@oliverchang
Copy link
Collaborator

Thanks!

I've pushed c1d4fe1 so that we are building the upstream fuzzer, so this PR is no longer needed.

@glennrp
Copy link
Contributor Author

glennrp commented Aug 22, 2017

You didn't answer my questions about copyright/license, above. What LICENSE file is the
commentary at the top of libpng_read_fuzzer.cc talking about? It doesn't seem to be about
Apache-2.0. If it was talking about the libpng license, that would be great.

@oliverchang
Copy link
Collaborator

oliverchang commented Aug 22, 2017

My bad, missed that.

I believe the LICENSE file is referring to the one in chromium, where we copied the file from: https://cs.chromium.org/chromium/src/LICENSE?q=LICENSE&sq=package:chromium&dr

I'm afraid I don't know how to answer "If it was talking about the libpng license, that would be great.", but I assume you would need to keep the existing chromium copyright notice as per the LICENSE file

@oliverchang
Copy link
Collaborator

Unfortunately it looks like the new changes have caused a build error:

Step #3: /src/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc:94:18: error: use of undeclared identifier 'read_ptr'

Could you please take a look at this?

@oliverchang oliverchang reopened this Aug 22, 2017
@glennrp
Copy link
Contributor Author

glennrp commented Aug 22, 2017 via email

@glennrp
Copy link
Contributor Author

glennrp commented Aug 22, 2017 via email

@oliverchang
Copy link
Collaborator

Thanks! Confirmed that the build is working again.

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.

2 participants