Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
From d4743b6092d513321c23c6f7fe5cff87cde043c1 Mon Sep 17 00:00:00 2001
|
||||
From: Robin Watts <Robin.Watts@artifex.com>
|
||||
Date: Mon, 12 Jan 2026 19:08:56 +0000
|
||||
Subject: Bug 709029: Fix incorrect error-case free of pixmap.
|
||||
|
||||
Don't free a pixmap we don't own!
|
||||
|
||||
CVE: CVE-2026-25556
|
||||
Upstream: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=d4743b6092d513321c23c6f7fe5cff87cde043c1
|
||||
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
|
||||
---
|
||||
source/fitz/util.c | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/source/fitz/util.c b/source/fitz/util.c
|
||||
index 7710124cc..90226a5c1 100644
|
||||
--- a/source/fitz/util.c
|
||||
+++ b/source/fitz/util.c
|
||||
@@ -119,7 +119,15 @@ fz_new_pixmap_from_display_list_with_separations(fz_context *ctx, fz_display_lis
|
||||
else
|
||||
fz_clear_pixmap_with_value(ctx, pix, 0xFF);
|
||||
|
||||
- return fz_fill_pixmap_from_display_list(ctx, list, ctm, pix);
|
||||
+ fz_try(ctx)
|
||||
+ fz_fill_pixmap_from_display_list(ctx, list, ctm, pix);
|
||||
+ fz_catch(ctx)
|
||||
+ {
|
||||
+ fz_drop_pixmap(ctx, pix);
|
||||
+ fz_rethrow(ctx);
|
||||
+ }
|
||||
+
|
||||
+ return pix;
|
||||
}
|
||||
|
||||
fz_pixmap *
|
||||
@@ -136,14 +144,9 @@ fz_fill_pixmap_from_display_list(fz_context *ctx, fz_display_list *list, fz_matr
|
||||
fz_close_device(ctx, dev);
|
||||
}
|
||||
fz_always(ctx)
|
||||
- {
|
||||
fz_drop_device(ctx, dev);
|
||||
- }
|
||||
fz_catch(ctx)
|
||||
- {
|
||||
- fz_drop_pixmap(ctx, pix);
|
||||
fz_rethrow(ctx);
|
||||
- }
|
||||
|
||||
return pix;
|
||||
}
|
||||
--
|
||||
cgit v1.2.3
|
||||
|
||||
22
package/mupdf/Config.in
Normal file
22
package/mupdf/Config.in
Normal file
@@ -0,0 +1,22 @@
|
||||
config BR2_PACKAGE_MUPDF
|
||||
bool "mupdf"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # harfbuzz
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # harfbuzz
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # harfbuzz
|
||||
select BR2_PACKAGE_FREETYPE
|
||||
select BR2_PACKAGE_GUMBO_PARSER
|
||||
select BR2_PACKAGE_HARFBUZZ
|
||||
select BR2_PACKAGE_JBIG2DEC
|
||||
select BR2_PACKAGE_JPEG
|
||||
select BR2_PACKAGE_LCMS2
|
||||
select BR2_PACKAGE_OPENJPEG
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
MuPDF is a lightweight PDF, XPS, and E-book viewer.
|
||||
|
||||
https://www.mupdf.com/
|
||||
|
||||
comment "mupdf needs a toolchain w/ C++, gcc >= 4.9"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
8
package/mupdf/mupdf.hash
Normal file
8
package/mupdf/mupdf.hash
Normal file
@@ -0,0 +1,8 @@
|
||||
# From https://mupdf.com/releases:
|
||||
sha1 d79600bccd70ab9d0e8ee19dae4e275f2af95ced mupdf-1.23.9-source.tar.lz
|
||||
|
||||
# Locally computed:
|
||||
sha256 2c2f89deb9f425ba637dac226191d547f2b40975c4d21a340965f52c001e15c5 mupdf-1.23.9-source.tar.lz
|
||||
|
||||
# Hash for license files:
|
||||
sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING
|
||||
77
package/mupdf/mupdf.mk
Normal file
77
package/mupdf/mupdf.mk
Normal file
@@ -0,0 +1,77 @@
|
||||
################################################################################
|
||||
#
|
||||
# mudpf
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# python-pymupdf's version be compatible with mupdf's version
|
||||
MUPDF_VERSION = 1.23.9
|
||||
MUPDF_SOURCE = mupdf-$(MUPDF_VERSION)-source.tar.lz
|
||||
MUPDF_SITE = https://mupdf.com/downloads/archive
|
||||
MUPDF_LICENSE = AGPL-3.0+
|
||||
MUPDF_LICENSE_FILES = COPYING
|
||||
MUPDF_CPE_ID_VENDOR = artifex
|
||||
MUPDF_INSTALL_STAGING = YES
|
||||
MUPDF_DEPENDENCIES = \
|
||||
freetype \
|
||||
gumbo-parser \
|
||||
harfbuzz \
|
||||
host-pkgconf \
|
||||
jbig2dec jpeg \
|
||||
lcms2 openjpeg \
|
||||
zlib
|
||||
|
||||
# Fix is in libfreeglut, but CVE applied to mupdf 1.23.9.
|
||||
# Buildroot libfreeglut is >3.4.0 then is not affected.
|
||||
MUPDF_IGNORE_CVES = \
|
||||
CVE-2024-24258 \
|
||||
CVE-2024-24259
|
||||
|
||||
# 0001-Fix-incorrect-error-case-free-of-pixmap.patch
|
||||
MUPDF_IGNORE_CVES += CVE-2026-25556
|
||||
|
||||
# mupdf doesn't use CFLAGS and LIBS but XCFLAGS and XLIBS instead.
|
||||
# with USE_SYSTEM_LIBS it will try to use system libraries instead of the bundled ones.
|
||||
MUPDF_MAKE_ENV = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
|
||||
XCFLAGS="$(TARGET_CFLAGS)" \
|
||||
XLIBS="$(TARGET_LDFLAGS)" \
|
||||
USE_SYSTEM_LIBS=yes
|
||||
|
||||
MUPDF_MAKE_OPTS = \
|
||||
HAVE_OBJCOPY=no \
|
||||
prefix="/usr"
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
MUPDF_MAKE_OPTS += shared=no
|
||||
else
|
||||
MUPDF_MAKE_OPTS += shared=yes
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBX11)$(BR2_PACKAGE_XLIB_LIBXEXT),yy)
|
||||
MUPDF_MAKE_OPTS += HAVE_X11=yes
|
||||
MUPDF_DEPENDENCIES += xlib_libX11 xlib_libXext
|
||||
else
|
||||
MUPDF_MAKE_OPTS += HAVE_X11=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y)
|
||||
MUPDF_DEPENDENCIES += libfreeglut
|
||||
else
|
||||
MUPDF_MAKE_OPTS += HAVE_GLUT=no
|
||||
endif
|
||||
|
||||
define MUPDF_BUILD_CMDS
|
||||
$(MUPDF_MAKE_ENV) $(MAKE) -C $(@D) $(MUPDF_MAKE_OPTS) all
|
||||
endef
|
||||
|
||||
define MUPDF_INSTALL_STAGING_CMDS
|
||||
$(MUPDF_MAKE_ENV) $(MAKE) -C $(@D) $(MUPDF_MAKE_OPTS) \
|
||||
DESTDIR="$(STAGING_DIR)" install-libs
|
||||
endef
|
||||
|
||||
define MUPDF_INSTALL_TARGET_CMDS
|
||||
$(MUPDF_MAKE_ENV) $(MAKE) -C $(@D) $(MUPDF_MAKE_OPTS) \
|
||||
DESTDIR="$(TARGET_DIR)" install-libs install-apps
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user