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

Segfault if the document object is not explicitly stored before using search #83

Open
0xbe7a opened this issue Nov 19, 2023 · 0 comments

Comments

@0xbe7a
Copy link

0xbe7a commented Nov 19, 2023

This segfaults:

from poppler import load_from_data, SearchDirection, CaseSensitivity, load_from_file

# https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
page = load_from_file("dummy.pdf").create_page(0)

page_rect = page.page_rect()

dummy_rect = page.search("Dummy", page_rect, SearchDirection.from_top, CaseSensitivity.case_sensitive)

while this works

from poppler import load_from_data, SearchDirection, CaseSensitivity, load_from_file

# https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
doc = load_from_file("dummy.pdf")
page = doc.create_page(0)

page_rect = page.page_rect()

dummy_rect = page.search("Dummy", page_rect, SearchDirection.from_top, CaseSensitivity.case_sensitive)
@0xbe7a 0xbe7a changed the title Segfault When Not Explicitly Storing Document Object Before Search Segfault if the document object is not explicitly stored before the search Nov 19, 2023
@0xbe7a 0xbe7a changed the title Segfault if the document object is not explicitly stored before the search Segfault if the document object is not explicitly stored before using search Nov 19, 2023
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

No branches or pull requests

1 participant