Fix file containing (null) issue in dwarf

This commit is contained in:
pancake 2017-05-25 01:55:53 +02:00
parent 83dadbc9aa
commit 3a262ba5d7
2 changed files with 2 additions and 1 deletions

View File

@ -331,7 +331,7 @@ static const ut8 *r_bin_dwarf_parse_lnp_header (
if (hdr->file_names) {
hdr->file_names[count].name = calloc (sizeof(char), namelen);
snprintf (hdr->file_names[count].name, namelen - 1,
"%s/%s", include_dir, filename);
"%s/%s", include_dir? include_dir : "", filename);
hdr->file_names[count].name[namelen - 1] = '\0';
free (allocated_id);
hdr->file_names[count].id_idx = id_idx;

View File

@ -52,6 +52,7 @@
#define REISERFS_MAX_LABEL_LENGTH 16
#define REISERFS_LABEL_OFFSET 0x64
#undef S_IFLNK
#define S_IFLNK 0xA000
static grub_dl_t my_mod;