0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 13:46:16 +00:00
termux-packages/x11-packages/thunderbird/0023-check-if-dlpi_name-is-nullptr-before-using.patch
2024-09-25 21:03:54 +08:00

12 lines
515 B
Diff

--- 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);