initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,38 @@
From e70c2605a11d12a8eeee3e7eec46077956e11e1f Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 17 Feb 2020 22:36:08 +0100
Subject: [PATCH] libtests/cxx11.cc: fix build with gcc 4.8
Build fails on gcc 4.8 since version 9.1.1 and commit
752416554086d5d34323bc14164d5084db83cfbd:
libtests/cxx11.cc: In function 'void do_regex()':
libtests/cxx11.cc:347:42: error: 'strlen' is not a member of 'std'
std::cregex_iterator m3(str7, str7 + std::strlen(str7), expr4);
^
To fix the build failure, add missing include on cstring
Fixes:
- http://autobuild.buildroot.org/results/ad7fb68ae87850a85509eed80fd0cae8721b10c5
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/qpdf/qpdf/pull/400]
---
libtests/cxx11.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/libtests/cxx11.cc b/libtests/cxx11.cc
index fa1dc6b..91ed7b1 100644
--- a/libtests/cxx11.cc
+++ b/libtests/cxx11.cc
@@ -1,5 +1,6 @@
#include <iostream>
#include <cassert>
+#include <cstring>
#include <functional>
#include <type_traits>
#include <cstdint>
--
2.24.1
@@ -0,0 +1,86 @@
From dc92574c10f3e2516ec6445b88c5d584f40df4e5 Mon Sep 17 00:00:00 2001
From: Jay Berkenbilt <ejb@ql.org>
Date: Mon, 4 Jan 2021 11:55:28 -0500
Subject: [PATCH] Fix some pipelines to be safe if downstream write fails (fuzz
issue 28262)
[Retrieved (and updated to remove updates on ChangeLog and fuzz) from:
https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
ChangeLog | 6 ++++++
fuzz/qpdf_extra/28262.fuzz | Bin 0 -> 40395 bytes
libqpdf/Pl_AES_PDF.cc | 2 +-
libqpdf/Pl_ASCII85Decoder.cc | 7 +++++--
libqpdf/Pl_ASCIIHexDecoder.cc | 6 ++++--
libqpdf/Pl_Count.cc | 2 +-
6 files changed, 17 insertions(+), 6 deletions(-)
create mode 100644 fuzz/qpdf_extra/28262.fuzz
diff --git a/libqpdf/Pl_AES_PDF.cc b/libqpdf/Pl_AES_PDF.cc
index 18cf3a4d..2865f804 100644
--- a/libqpdf/Pl_AES_PDF.cc
+++ b/libqpdf/Pl_AES_PDF.cc
@@ -238,6 +238,6 @@ Pl_AES_PDF::flush(bool strip_padding)
}
}
}
- getNext()->write(this->outbuf, bytes);
this->offset = 0;
+ getNext()->write(this->outbuf, bytes);
}
diff --git a/libqpdf/Pl_ASCII85Decoder.cc b/libqpdf/Pl_ASCII85Decoder.cc
index b8df3e87..9d9f6704 100644
--- a/libqpdf/Pl_ASCII85Decoder.cc
+++ b/libqpdf/Pl_ASCII85Decoder.cc
@@ -119,10 +119,13 @@ Pl_ASCII85Decoder::flush()
QTC::TC("libtests", "Pl_ASCII85Decoder partial flush",
(this->pos == 5) ? 0 : 1);
- getNext()->write(outbuf, this->pos - 1);
-
+ // Reset before calling getNext()->write in case that throws an
+ // exception.
+ auto t = this->pos - 1;
this->pos = 0;
memset(this->inbuf, 117, 5);
+
+ getNext()->write(outbuf, t);
}
void
diff --git a/libqpdf/Pl_ASCIIHexDecoder.cc b/libqpdf/Pl_ASCIIHexDecoder.cc
index f20a9769..7845268e 100644
--- a/libqpdf/Pl_ASCIIHexDecoder.cc
+++ b/libqpdf/Pl_ASCIIHexDecoder.cc
@@ -97,12 +97,14 @@ Pl_ASCIIHexDecoder::flush()
QTC::TC("libtests", "Pl_ASCIIHexDecoder partial flush",
(this->pos == 2) ? 0 : 1);
- getNext()->write(&ch, 1);
-
+ // Reset before calling getNext()->write in case that throws an
+ // exception.
this->pos = 0;
this->inbuf[0] = '0';
this->inbuf[1] = '0';
this->inbuf[2] = '\0';
+
+ getNext()->write(&ch, 1);
}
void
diff --git a/libqpdf/Pl_Count.cc b/libqpdf/Pl_Count.cc
index 8077092a..c35619b8 100644
--- a/libqpdf/Pl_Count.cc
+++ b/libqpdf/Pl_Count.cc
@@ -27,8 +27,8 @@ Pl_Count::write(unsigned char* buf, size_t len)
if (len)
{
this->m->count += QIntC::to_offset(len);
- getNext()->write(buf, len);
this->m->last_char = buf[len - 1];
+ getNext()->write(buf, len);
}
}
+20
View File
@@ -0,0 +1,20 @@
config BR2_PACKAGE_QPDF
bool "qpdf"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_JPEG
help
QPDF is a command-line program that does structural,
content- preserving transformations on PDF files. It could
have been called something like pdf-to-pdf. It also provides
many useful capabilities to developers of PDF-producing
software or for people who just want to look at the innards
of a PDF file to learn more about how they work.
http://qpdf.sourceforge.net/
comment "qpdf needs a toolchain w/ C++, wchar, gcc >= 4.7"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+5
View File
@@ -0,0 +1,5 @@
# From https://sourceforge.net/projects/qpdf/files/qpdf/9.1.1/qpdf-9.1.1.sha512/download
sha512 008a11fef663a57ca173631f2053988023babea6c333cfe01db0ef955c8cd36d387ed9f2039f55bd5f9ca94c7a8e400461a09a15c5f89e03bc0817fdd0d3d585 qpdf-9.1.1.tar.gz
# Locally computed:
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.txt
sha256 fb929ac30decb4dc3a2eea2bec6c43296a797c5d2d602deb3784ee39430583d5 Artistic-2.0
+27
View File
@@ -0,0 +1,27 @@
################################################################################
#
# qpdf
#
################################################################################
QPDF_VERSION = 9.1.1
QPDF_SITE = http://downloads.sourceforge.net/project/qpdf/qpdf/$(QPDF_VERSION)
QPDF_INSTALL_STAGING = YES
QPDF_LICENSE = Apache-2.0 or Artistic-2.0
QPDF_LICENSE_FILES = LICENSE.txt Artistic-2.0
QPDF_CPE_ID_VENDOR = qpdf_project
QPDF_DEPENDENCIES = host-pkgconf zlib jpeg
QPDF_CONF_OPTS = --with-random=/dev/urandom
# 0002-Fix-some-pipelines-to-be-safe-if-downstream-write-fails.patch
QPDF_IGNORE_CVES += CVE-2021-36978
ifeq ($(BR2_PACKAGE_GNUTLS),y)
QPDF_CONF_OPTS += --enable-crypto-gnutls
QPDF_DEPENDENCIES += gnutls
else
QPDF_CONF_OPTS += --disable-crypto-gnutls
endif
$(eval $(autotools-package))