2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Merge pull request #1224 from m-holger/fuzz3

Fix #1170
This commit is contained in:
m-holger 2024-06-27 08:47:42 +01:00 committed by GitHub
commit 6ed2880405
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -119,6 +119,7 @@ set(CORPUS_OTHER
68668.fuzz
68915.fuzz
69857.fuzz
69913.fuzz
)
set(CORPUS_DIR ${CMAKE_CURRENT_BINARY_DIR}/qpdf_corpus)

BIN
fuzz/qpdf_extra/69913.fuzz Normal file

Binary file not shown.

View File

@ -21,7 +21,7 @@ my @fuzzers = (
['pngpredictor' => 1],
['runlength' => 6],
['tiffpredictor' => 2],
['qpdf' => 61], # increment when adding new files
['qpdf' => 62], # increment when adding new files
);
my $n_tests = 0;

View File

@ -905,9 +905,8 @@ QPDF::read_xrefEntry(qpdf_offset_t& f1, int& f2, char& type)
if (QUtil::is_space(*p++) && (*p == 'f' || *p == 'n')) {
// C++20: [[likely]]
type = *p;
++p;
++p; // No test for valid line[19].
if ((*p == '\n' || *p == '\r') && f1_len == 10 && f2_len == 5) {
// No test for valid line[19].
if (*(++p) && *(++p) && (*p == '\n' || *p == '\r') && f1_len == 10 && f2_len == 5) {
// C++20: [[likely]]
return true;
}