Skip to content

Crash issue when using FPDFBookmark_GetDest and FPDFDest_GetDestPageIndex on Linux-musl-arm64 with version 144.0.7543.0 #216

@ToNight113

Description

@ToNight113

When using the PDFium library built for Linux-musl-arm64 in a HarmonyOS mobile application, the following code snippet:
FPDF_DEST dest = FPDFBookmark_GetDest(doc, bookmark);
if (dest) {
int destPageIdx = FPDFDest_GetDestPageIndex(doc, dest);
if (destPageIdx >= 0) {
return static_cast(destPageIdx);
}
}
causes the application to crash. Specifically, after recursively invoking FPDFBookmark_GetDest and FPDFDest_GetDestPageIndex more than eight times, a crash occurs due to null pointer dereference or invalid (wild) pointer access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions