From f557019c5d786ddca742765b084133f39ec23aa8 Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Sat, 9 Mar 2024 18:18:39 +0800 Subject: [PATCH] firefox: check if `dlpi_name` is nullptr before using --- ...check-if-dlpi_name-is-nullptr-before-using.patch | 13 +++++++++++++ x11-packages/firefox/build.sh | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 x11-packages/firefox/0023-check-if-dlpi_name-is-nullptr-before-using.patch diff --git a/x11-packages/firefox/0023-check-if-dlpi_name-is-nullptr-before-using.patch b/x11-packages/firefox/0023-check-if-dlpi_name-is-nullptr-before-using.patch new file mode 100644 index 00000000000000..b7c32b99840016 --- /dev/null +++ b/x11-packages/firefox/0023-check-if-dlpi_name-is-nullptr-before-using.patch @@ -0,0 +1,13 @@ +https://github.com/termux/termux-packages/issues/19050 + +--- a/gfx/gl/GLContext.cpp ++++ b/gfx/gl/GLContext.cpp +@@ -2619,6 +2619,8 @@ + dl_iterate_phdr( + [](dl_phdr_info* info, size_t size, void* data) { + auto& foundPath = *reinterpret_cast*>(data); ++ // XXX: `dlpi_name` may be nullptr, see termux/termux-packages#19050. ++ if (info->dlpi_name == nullptr) return 0; + nsDependentCString thisPath(info->dlpi_name); + if (StringEndsWith(thisPath, "/swrast_dri.so"_ns)) { + foundPath.emplace(thisPath); diff --git a/x11-packages/firefox/build.sh b/x11-packages/firefox/build.sh index 9b797f50e8076d..19cd907c1366ef 100644 --- a/x11-packages/firefox/build.sh +++ b/x11-packages/firefox/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Mozilla Firefox web browser" TERMUX_PKG_LICENSE="MPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="121.0.1" -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://ftp.mozilla.org/pub/firefox/releases/${TERMUX_PKG_VERSION}/source/firefox-${TERMUX_PKG_VERSION}.source.tar.xz TERMUX_PKG_SHA256=b3a4216e01eaeb9a7c6ef4659d8dcd956fbd90a78a8279ee3a598881e63e49ce # ffmpeg and pulseaudio are dependencies through dlopen(3):