commit 53676f73312d33d5945bc60e718fd1a5647951e5
parent c66bb872cd601ff3c80ae698013bfe62371ac5c1
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 30 Jan 2025 16:56:21 +0100
libmach/elf: Assing always a name in elfprobe()
We were not assigning any name when we were using the default unknonw architecture
and it broke the assumptions from the caller.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/libmach/elf/elfprobe.c b/src/libmach/elf/elfprobe.c
@@ -43,5 +43,8 @@ elfprobe(unsigned char *buf, char **name)
}
}
+ if (name)
+ *name = "elf-unknown";
+
return OBJ(ELF, arch, endian);
}