mirror of
https://github.com/termux/termux-packages.git
synced 2025-01-06 02:26:34 +00:00
99f6fe4deb
At least on an Android O device I have, one of the dl_phdr_info objects passed to the callback of dl_iterate_phdr has NULL in its dlpi_name field.
17 lines
511 B
Diff
17 lines
511 B
Diff
diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c
|
|
index 2d86321..ecb011b 100644
|
|
--- a/lib/gvc/gvconfig.c
|
|
+++ b/lib/gvc/gvconfig.c
|
|
@@ -268,6 +268,11 @@ static void gvconfig_write_library_config(GVC_t *gvc, char *lib_path,
|
|
static int line_callback(struct dl_phdr_info *info, size_t size, void *line)
|
|
{
|
|
const char *p = info->dlpi_name;
|
|
+
|
|
+ /* At least on an Android O device I have, this can happen */
|
|
+ if (!p)
|
|
+ return 0;
|
|
+
|
|
char *tmp = strstr(p, "/libgvc.");
|
|
(void) size;
|
|
if (tmp) {
|