Skip to content

Realloc zero, fixes undefined behaviour #119

Open
berthubert wants to merge 2 commits intohyattpd:GoogleImportfrom
berthubert:realloc-zero
Open

Realloc zero, fixes undefined behaviour #119
berthubert wants to merge 2 commits intohyattpd:GoogleImportfrom
berthubert:realloc-zero

Conversation

@berthubert
Copy link
Copy Markdown

Valgrind saw Prodigal access uninitialized memory. This was because resizing the nodes array using realloc did not zero the newly allocated memory. This could have had consequences for generated gene predictions if you were unlucky.

This PR makes sure that the new memory is zeroed as well. In addition, an error message if /dev/stdin was not available was fixed to not crash.

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