diff options
author | Matt Turner <mattst88@gmail.com> | 2022-04-03 16:23:16 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2022-04-03 16:23:16 -0700 |
commit | 3453c3fc3516996fc9a96469249ee7a223e5e32b (patch) | |
tree | 81740ff1dab0e59aa461c5a4f46c6fd32c6bda6c | |
parent | 72ea519e3563df60fe81a9534e0b8b85bd63a37f (diff) |
Apparently this can happen on some versions of Android. Fixed in Mesa
with commit 70d25cae8b9 ("util/build-id: check dlpi_name before strstr
call").
Closes: https://github.com/mattst88/build-id/issues/5
-rw-r--r-- | build-id.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -65,8 +65,9 @@ build_id_find_nhdr_callback(struct dl_phdr_info *info, size_t size, void *data_) { struct callback_data *data = data_; - if (data->tag == BY_NAME && strcmp(info->dlpi_name, data->name) != 0) - return 0; + if (data->tag == BY_NAME) + if (!info->dlpi_name || strcmp(info->dlpi_name, data->name) != 0) + return 0; if (data->tag == BY_SYMBOL) { /* Calculate address where shared object is mapped into the process space. |