Skip to content

Commit

Permalink
incorrect strlen usage
Browse files Browse the repository at this point in the history
- causes overflow for empty string
  • Loading branch information
MartinNowak committed Dec 15, 2013
1 parent 06ff681 commit 4960899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/dwarf.c
Expand Up @@ -739,7 +739,7 @@ int dwarf_line_addfile(const char* filename)

Abuf abuf;
abuf.buf = (const unsigned char*)filename;
abuf.length = strlen(filename)-1;
abuf.length = strlen(filename);

unsigned *pidx = (unsigned *)infoFileName_table->get(&abuf);
if (!*pidx) // if no idx assigned yet
Expand Down

0 comments on commit 4960899

Please sign in to comment.