A flaw in the way the library handles crafted PDF files can lead to uncontrolled resource consumption. Specifically, when a PDF contains indirect-object identifiers or generation-number tokens that persist for a long duration without whitespace, the `read until whitespace` function within `pypdf/ reader.py` and `pypdf/generic/ base.py` scans excessive input. This results in long runtimes and can lead to application unavailability.