Skip to content

Commit

Permalink
firefox: check if dlpi_name is nullptr before using
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Mar 11, 2024
1 parent c4009e4 commit f557019
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
@@ -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<Maybe<nsAutoCString>*>(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);
2 changes: 1 addition & 1 deletion x11-packages/firefox/build.sh
Expand Up @@ -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):
Expand Down

0 comments on commit f557019

Please sign in to comment.