Skip to content

Fix wrong memory usage in Tree::read#4

Open
y-uti wants to merge 1 commit intotaku910:masterfrom
y-uti:patch-1
Open

Fix wrong memory usage in Tree::read#4
y-uti wants to merge 1 commit intotaku910:masterfrom
y-uti:patch-1

Conversation

@y-uti
Copy link
Copy Markdown

@y-uti y-uti commented Oct 29, 2016

Valgrind has pointed out errors that "Conditional jump or move depends on uninitialised value(s)" in CaboCha::Tree::read(char const*, unsigned long, CaboCha::InputLayerType).

It seems following problems exist (and fixed in this PR)

  • *length should be decreased 1 more, because n points to LF
  • buf should be null terminated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant