Skip to content

Commit

Permalink
Fix #2684
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarofe authored and radare committed Jun 4, 2015
1 parent 2acf7d4 commit 008158f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libr/bin/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ static const ut8* r_bin_dwarf_parse_ext_opcode(const RBin *a, const ut8 *obuf,

buf += (strlen (filename) + 1);
ut64 dir_idx;
buf = r_uleb128 (buf, ST32_MAX, &dir_idx);
if (buf+1 < buf_end)
buf = r_uleb128 (buf, ST32_MAX, &dir_idx);
break;
case DW_LNE_set_discriminator:
buf = r_uleb128(buf, ST32_MAX, &addr);
Expand Down Expand Up @@ -1522,7 +1523,7 @@ R_API RList *r_bin_dwarf_parse_line(RBin *a, int mode) {
if (len<1) {
return NULL;
}
buf = calloc (1, len);
buf = calloc (1, len+1);
ret = r_buf_read_at (binfile->buf, section->paddr, buf, len);
if (!ret) {
free (buf);
Expand Down

0 comments on commit 008158f

Please sign in to comment.